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
3bed8141
Commit
3bed8141
authored
Dec 28, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(simplify_comparison, case NEG): Replace large block of code with
equivalent call to num_sign_bit_copies. From-SVN: r2972
parent
cbec710e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
22 deletions
+3
-22
gcc/combine.c
+3
-22
No files found.
gcc/combine.c
View file @
3bed8141
...
...
@@ -8029,28 +8029,9 @@ simplify_comparison (code, pop0, pop1)
continue
;
}
/* If we have NEG of something that is the result of a
SIGN_EXTEND, SIGN_EXTRACT, or ASHIFTRT, we know that the
two high-order bits must be the same and hence that
"(-a) < 0" is equivalent to "a > 0". Otherwise, we can't
do this. */
if
(
GET_CODE
(
XEXP
(
op0
,
0
))
==
SIGN_EXTEND
||
(
GET_CODE
(
XEXP
(
op0
,
0
))
==
SIGN_EXTRACT
&&
GET_CODE
(
XEXP
(
XEXP
(
op0
,
0
),
1
))
==
CONST_INT
&&
(
INTVAL
(
XEXP
(
XEXP
(
op0
,
0
),
1
))
<
GET_MODE_BITSIZE
(
GET_MODE
(
XEXP
(
XEXP
(
op0
,
0
),
0
)))))
||
(
GET_CODE
(
XEXP
(
op0
,
0
))
==
ASHIFTRT
&&
GET_CODE
(
XEXP
(
XEXP
(
op0
,
0
),
1
))
==
CONST_INT
&&
XEXP
(
XEXP
(
op0
,
0
),
1
)
!=
const0_rtx
)
||
((
tem
=
get_last_value
(
XEXP
(
op0
,
0
)))
!=
0
&&
(
GET_CODE
(
tem
)
==
SIGN_EXTEND
||
(
GET_CODE
(
tem
)
==
SIGN_EXTRACT
&&
GET_CODE
(
XEXP
(
tem
,
1
))
==
CONST_INT
&&
(
INTVAL
(
XEXP
(
tem
,
1
))
<
GET_MODE_BITSIZE
(
GET_MODE
(
XEXP
(
tem
,
0
)))))
||
(
GET_CODE
(
tem
)
==
ASHIFTRT
&&
GET_CODE
(
XEXP
(
tem
,
1
))
==
CONST_INT
&&
XEXP
(
tem
,
1
)
!=
const0_rtx
))))
/* If we have NEG of something whose two high-order bits are the
same, we know that "(-a) < 0" is equivalent to "a > 0". */
if
(
num_sign_bit_copies
(
op0
,
mode
)
>=
2
)
{
op0
=
XEXP
(
op0
,
0
);
code
=
swap_condition
(
code
);
...
...
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