Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
29d72c4b
Commit
29d72c4b
authored
Nov 17, 1994
by
Torbjorn Granlund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(simplify_binary_operation): Do (x - (x & y)) -> (x & ~y).
From-SVN: r8494
parent
b76f773b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
gcc/cse.c
+9
-0
No files found.
gcc/cse.c
View file @
29d72c4b
...
@@ -3718,6 +3718,15 @@ simplify_binary_operation (code, mode, op0, op1)
...
@@ -3718,6 +3718,15 @@ simplify_binary_operation (code, mode, op0, op1)
/* Don't let a relocatable value get a negative coeff. */
/* Don't let a relocatable value get a negative coeff. */
if
(
GET_CODE
(
op1
)
==
CONST_INT
&&
GET_MODE
(
op0
)
!=
VOIDmode
)
if
(
GET_CODE
(
op1
)
==
CONST_INT
&&
GET_MODE
(
op0
)
!=
VOIDmode
)
return
plus_constant
(
op0
,
-
INTVAL
(
op1
));
return
plus_constant
(
op0
,
-
INTVAL
(
op1
));
/* (x - (x & y)) -> (x & ~y) */
if
(
GET_CODE
(
op1
)
==
AND
)
{
if
(
rtx_equal_p
(
op0
,
XEXP
(
op1
,
0
)))
return
cse_gen_binary
(
AND
,
mode
,
op0
,
gen_rtx
(
NOT
,
mode
,
XEXP
(
op1
,
1
)));
if
(
rtx_equal_p
(
op0
,
XEXP
(
op1
,
1
)))
return
cse_gen_binary
(
AND
,
mode
,
op0
,
gen_rtx
(
NOT
,
mode
,
XEXP
(
op1
,
0
)));
}
break
;
break
;
case
MULT
:
case
MULT
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment