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
015c3186
Commit
015c3186
authored
Mar 20, 2003
by
Kazu Hirata
Committed by
Kazu Hirata
Mar 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* fold-const.c (fold): Fold A - (A & B) into ~B & A.
From-SVN: r64615
parent
101cb92a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
gcc/ChangeLog
+4
-0
gcc/fold-const.c
+16
-0
No files found.
gcc/ChangeLog
View file @
015c3186
2003-03-20 Kazu Hirata <kazu at cs dot umass dot edu>
* fold-const.c (fold): Fold A - (A & B) into ~B & A.
2003-03-20 Kazu Hirata <kazu@cs.umass.edu>
2003-03-20 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (a peephole2): New.
* config/h8300/h8300.md (a peephole2): New.
...
...
gcc/fold-const.c
View file @
015c3186
...
@@ -5560,6 +5560,22 @@ fold (expr)
...
@@ -5560,6 +5560,22 @@ fold (expr)
TREE_OPERAND
(
arg0
,
0
),
TREE_OPERAND
(
arg0
,
0
),
TREE_OPERAND
(
arg1
,
0
))),
TREE_OPERAND
(
arg1
,
0
))),
TREE_OPERAND
(
arg0
,
1
)));
TREE_OPERAND
(
arg0
,
1
)));
/* Fold A - (A & B) into ~B & A. */
if
(
!
TREE_SIDE_EFFECTS
(
arg0
)
&&
TREE_CODE
(
arg1
)
==
BIT_AND_EXPR
)
{
if
(
operand_equal_p
(
arg0
,
TREE_OPERAND
(
arg1
,
1
),
0
))
return
fold
(
build
(
BIT_AND_EXPR
,
type
,
fold
(
build1
(
BIT_NOT_EXPR
,
type
,
TREE_OPERAND
(
arg1
,
0
))),
arg0
));
if
(
operand_equal_p
(
arg0
,
TREE_OPERAND
(
arg1
,
0
),
0
))
return
fold
(
build
(
BIT_AND_EXPR
,
type
,
fold
(
build1
(
BIT_NOT_EXPR
,
type
,
TREE_OPERAND
(
arg1
,
1
))),
arg0
));
}
}
}
/* See if ARG1 is zero and X - ARG1 reduces to X. */
/* See if ARG1 is zero and X - ARG1 reduces to X. */
...
...
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