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
cc5edac6
Commit
cc5edac6
authored
Sep 30, 1993
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fold, case PLUS_EXPR, MINUS_EXPR): Properly handle case when ARG1
splits and VARSIGN is -1. From-SVN: r5537
parent
a11826d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
gcc/fold-const.c
+8
-5
No files found.
gcc/fold-const.c
View file @
cc5edac6
...
...
@@ -3691,6 +3691,13 @@ fold (expr)
if
(
split_tree
(
arg1
,
code
,
&
var
,
&
con
,
&
varsign
))
{
if
(
TREE_CONSTANT
(
arg1
))
return
t
;
if
(
varsign
==
-
1
)
TREE_SET_CODE
(
t
,
(
code
==
PLUS_EXPR
?
MINUS_EXPR
:
PLUS_EXPR
));
/* EXPR is ARG0 +- (CON +- VAR). */
if
(
TREE_CODE
(
t
)
==
MINUS_EXPR
&&
operand_equal_p
(
var
,
arg0
,
0
))
...
...
@@ -3701,11 +3708,7 @@ fold (expr)
return
fold
(
build1
(
NEGATE_EXPR
,
TREE_TYPE
(
t
),
convert
(
TREE_TYPE
(
t
),
con
)));
}
if
(
TREE_CONSTANT
(
arg1
))
return
t
;
if
(
varsign
==
-
1
)
TREE_SET_CODE
(
t
,
(
code
==
PLUS_EXPR
?
MINUS_EXPR
:
PLUS_EXPR
));
TREE_OPERAND
(
t
,
0
)
=
fold
(
build
(
code
,
TREE_TYPE
(
t
),
arg0
,
con
));
TREE_OPERAND
(
t
,
1
)
=
var
;
...
...
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