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
d434a42c
Commit
d434a42c
authored
Sep 09, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(convert_to_integer): When optimizing LSHIFT_EXPR and
RSHIFT_EXPR, do compares at tree level. From-SVN: r2086
parent
24f8db99
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
gcc/c-convert.c
+8
-8
No files found.
gcc/c-convert.c
View file @
d434a42c
...
...
@@ -177,20 +177,20 @@ convert_to_integer (type, expr)
{
case
RSHIFT_EXPR
:
/* We can pass truncation down through right shifting
when the shift count is a negative constant. */
if
(
TREE_CODE
(
TREE_OPERAND
(
expr
,
1
))
!=
INTEGER_CST
||
TREE_INT_CST_LOW
(
TREE_OPERAND
(
expr
,
1
))
>
0
)
break
;
when the shift count is a nonpositive constant. */
if
(
TREE_CODE
(
TREE_OPERAND
(
expr
,
1
))
==
INTEGER_CST
&&
tree_int_cst_lt
(
TREE_OPERAND
(
expr
,
1
),
integer_one_node
))
goto
trunc1
;
break
;
case
LSHIFT_EXPR
:
/* We can pass truncation down through left shifting
when the shift count is a positive constant. */
if
(
TREE_CODE
(
TREE_OPERAND
(
expr
,
1
))
!=
INTEGER_CST
||
TREE_INT_CST_LOW
(
TREE_OPERAND
(
expr
,
1
))
<
0
)
break
;
when the shift count is a nonnegative constant. */
if
(
TREE_CODE
(
TREE_OPERAND
(
expr
,
1
))
==
INTEGER_CST
&&
!
tree_int_cst_lt
(
TREE_OPERAND
(
expr
,
1
),
integer_zero_node
))
/* In this case, shifting is like multiplication. */
goto
trunc1
;
break
;
case
MAX_EXPR
:
case
MIN_EXPR
:
...
...
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