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
03e0a65f
Commit
03e0a65f
authored
Oct 14, 1999
by
Jeffrey A Law
Committed by
Jeff Law
Oct 14, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* fold-const.c (fold): Detect rotates built from BIT_XOR_EXPRs.
From-SVN: r29966
parent
0918eca0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
gcc/ChangeLog
+4
-0
gcc/fold-const.c
+7
-1
No files found.
gcc/ChangeLog
View file @
03e0a65f
Thu
Oct
14
02
:
54
:
13
1999
Jeffrey
A
Law
(
law
@cygnus
.
com
)
*
fold
-
const
.
c
(
fold
)
:
Detect
rotates
built
from
BIT_XOR_EXPRs
.
Thu
Oct
14
02
:
18
:
19
1999
Marc
Espie
<
espie
@cvs
.
openbsd
.
org
>
*
combine
.
c
(
simplify_logical
)
:
Recognize
xor
pattern
that
encodes
...
...
gcc/fold-const.c
View file @
03e0a65f
...
...
@@ -5097,11 +5097,15 @@ fold (expr)
if
(
t1
!=
NULL_TREE
)
return
t1
;
bit_rotate
:
/* (A << C1) | (A >> C2) if A is unsigned and C1+C2 is the size of A
is a rotate of A by C1 bits. */
/* (A << B) | (A >> (Z - B)) if A is unsigned and Z is the size of A
is a rotate of A by B bits. */
/* Both transformations noted above also apply to when the inner
operation is an XOR. */
code0
=
TREE_CODE
(
arg0
);
code1
=
TREE_CODE
(
arg1
);
if
(((
code0
==
RSHIFT_EXPR
&&
code1
==
LSHIFT_EXPR
)
...
...
@@ -5170,7 +5174,9 @@ fold (expr)
return
non_lvalue
(
convert
(
type
,
arg0
));
if
(
integer_all_onesp
(
arg1
))
return
fold
(
build1
(
BIT_NOT_EXPR
,
type
,
arg0
));
goto
associate
;
/* See if this can be simplified into a rotate first. If that
is unsuccessful we will jump to the association code. */
goto
bit_rotate
;
case
BIT_AND_EXPR
:
bit_and
:
...
...
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