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
0786ca87
Commit
0786ca87
authored
Jan 12, 2004
by
Paul Brook
Committed by
Paul Brook
Jan 12, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* simplify-rtx.c (simplify_plus_minus): Always generate canonical form.
From-SVN: r75724
parent
543ca912
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
gcc/ChangeLog
+4
-0
gcc/simplify-rtx.c
+4
-10
No files found.
gcc/ChangeLog
View file @
0786ca87
2004-01-09 Paul Brook <paul@codesourcery.com>
* simplify-rtx.c (simplify_plus_minus): Always generate canonical form.
2004-01-09 J"orn Rennecke <joern.rennecke@superh.com>
PR target/13585
...
...
gcc/simplify-rtx.c
View file @
0786ca87
...
...
@@ -2250,7 +2250,7 @@ simplify_plus_minus (enum rtx_code code, enum machine_mode mode, rtx op0,
struct
simplify_plus_minus_op_data
ops
[
8
];
rtx
result
,
tem
;
int
n_ops
=
2
,
input_ops
=
2
,
input_consts
=
0
,
n_consts
;
int
first
,
negate
,
changed
;
int
first
,
changed
;
int
i
,
j
;
memset
(
ops
,
0
,
sizeof
ops
);
...
...
@@ -2460,18 +2460,12 @@ simplify_plus_minus (enum rtx_code code, enum machine_mode mode, rtx op0,
||
(
n_ops
+
n_consts
==
input_ops
&&
n_consts
<=
input_consts
)))
return
NULL_RTX
;
/* Put a non-negated operand first. If there aren't any, make all
operands positive and negate the whole thing later. */
/* Put a non-negated operand first, if possible. */
negate
=
0
;
for
(
i
=
0
;
i
<
n_ops
&&
ops
[
i
].
neg
;
i
++
)
continue
;
if
(
i
==
n_ops
)
{
for
(
i
=
0
;
i
<
n_ops
;
i
++
)
ops
[
i
].
neg
=
0
;
negate
=
1
;
}
ops
[
0
].
op
=
gen_rtx_NEG
(
mode
,
ops
[
0
].
op
);
else
if
(
i
!=
0
)
{
tem
=
ops
[
0
].
op
;
...
...
@@ -2486,7 +2480,7 @@ simplify_plus_minus (enum rtx_code code, enum machine_mode mode, rtx op0,
result
=
gen_rtx_fmt_ee
(
ops
[
i
].
neg
?
MINUS
:
PLUS
,
mode
,
result
,
ops
[
i
].
op
);
return
negate
?
gen_rtx_NEG
(
mode
,
result
)
:
result
;
return
result
;
}
/* Like simplify_binary_operation except used for relational operators.
...
...
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