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
d0cb4c65
Commit
d0cb4c65
authored
Mar 14, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fold): Call tree_int_cst_sgn.
(fold, case *_DIV_EXPR): Add missing conversion. From-SVN: r6779
parent
153c149b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
gcc/fold-const.c
+7
-7
No files found.
gcc/fold-const.c
View file @
d0cb4c65
...
...
@@ -3978,7 +3978,7 @@ fold (expr)
Look for NOPs and SAVE_EXPRs inside. */
if
(
TREE_CODE
(
arg1
)
==
INTEGER_CST
&&
tree_int_cst_
lt
(
integer_zero_node
,
arg1
)
)
&&
tree_int_cst_
sgn
(
arg1
)
>=
0
)
{
int
have_save_expr
=
0
;
tree
c2
=
integer_zero_node
;
...
...
@@ -4009,12 +4009,12 @@ fold (expr)
if
(
TREE_CODE
(
xarg0
)
==
MULT_EXPR
&&
TREE_CODE
(
TREE_OPERAND
(
xarg0
,
1
))
==
INTEGER_CST
&&
tree_int_cst_
lt
(
integer_zero_node
,
TREE_OPERAND
(
xarg0
,
1
))
&&
tree_int_cst_
sgn
(
TREE_OPERAND
(
xarg0
,
1
))
>=
0
&&
(
integer_zerop
(
const_binop
(
TRUNC_MOD_EXPR
,
TREE_OPERAND
(
xarg0
,
1
),
arg1
,
1
))
||
integer_zerop
(
const_binop
(
TRUNC_MOD_EXPR
,
arg1
,
TREE_OPERAND
(
xarg0
,
1
),
1
)))
&&
(
tree_int_cst_
lt
(
integer_zero_node
,
c2
)
&&
(
tree_int_cst_
sgn
(
c2
)
>=
0
||
integer_zerop
(
const_binop
(
TRUNC_MOD_EXPR
,
c2
,
arg1
,
1
))))
{
...
...
@@ -4035,7 +4035,7 @@ fold (expr)
const_binop
(
code
,
c2
,
c3
,
1
)));
if
(
!
integer_onep
(
outer_div
))
t
=
fold
(
build
(
code
,
type
,
t
,
outer_div
));
t
=
fold
(
build
(
code
,
type
,
t
,
convert
(
type
,
outer_div
)
));
if
(
have_save_expr
)
t
=
save_expr
(
t
);
...
...
@@ -4091,7 +4091,7 @@ fold (expr)
&&
integer_zerop
(
const_binop
(
TRUNC_MOD_EXPR
,
TREE_OPERAND
(
xarg0
,
1
),
arg1
,
1
))
&&
tree_int_cst_
lt
(
integer_zero_node
,
c2
)
)
&&
tree_int_cst_
sgn
(
c2
)
>=
0
)
/* The result is (C2%C3). */
return
omit_one_operand
(
type
,
const_binop
(
code
,
c2
,
arg1
,
1
),
TREE_OPERAND
(
xarg0
,
0
));
...
...
@@ -4107,7 +4107,7 @@ fold (expr)
return
non_lvalue
(
convert
(
type
,
arg0
));
/* Since negative shift count is not well-defined,
don't try to compute it in the compiler. */
if
(
tree_int_cst_
lt
(
arg1
,
integer_zero_node
)
)
if
(
tree_int_cst_
sgn
(
arg1
)
<
0
)
return
t
;
goto
binary
;
...
...
@@ -4309,7 +4309,7 @@ fold (expr)
/* Change X >= CST to X > (CST - 1) if CST is positive. */
if
(
TREE_CODE
(
arg1
)
==
INTEGER_CST
&&
TREE_CODE
(
arg0
)
!=
INTEGER_CST
&&
!
tree_int_cst_lt
(
arg1
,
integer_one_node
)
)
&&
tree_int_cst_sgn
(
arg1
)
>
0
)
{
switch
(
TREE_CODE
(
t
))
{
...
...
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