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
b9b5c1b3
Commit
b9b5c1b3
authored
Mar 09, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fold, case MULT_EXPR): Simplify MULT_EXPR of an EXACT_DIV_EXPR with
the same divisor as our multiplicand. From-SVN: r6734
parent
6946afd3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
gcc/fold-const.c
+8
-0
No files found.
gcc/fold-const.c
View file @
b9b5c1b3
...
...
@@ -3820,6 +3820,14 @@ fold (expr)
if
(
integer_onep
(
arg1
))
return
non_lvalue
(
convert
(
type
,
arg0
));
/* ((A / C) * C) is A if the division is an
EXACT_DIV_EXPR. Since C is normally a constant,
just check for one of the four possibilities. */
if
(
TREE_CODE
(
arg0
)
==
EXACT_DIV_EXPR
&&
operand_equal_p
(
TREE_OPERAND
(
arg0
,
1
),
arg1
,
0
))
return
TREE_OPERAND
(
arg0
,
0
);
/* (a * (1 << b)) is (a << b) */
if
(
TREE_CODE
(
arg1
)
==
LSHIFT_EXPR
&&
integer_onep
(
TREE_OPERAND
(
arg1
,
0
)))
...
...
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