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
5be669c7
Commit
5be669c7
authored
Dec 10, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(simplify_if_then_else): Convert "a == b ? b : a" to "a".
From-SVN: r10698
parent
05019f83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
gcc/combine.c
+10
-0
No files found.
gcc/combine.c
View file @
5be669c7
...
@@ -4025,6 +4025,16 @@ simplify_if_then_else (x)
...
@@ -4025,6 +4025,16 @@ simplify_if_then_else (x)
if
(
rtx_equal_p
(
true
,
false
)
&&
!
side_effects_p
(
cond
))
if
(
rtx_equal_p
(
true
,
false
)
&&
!
side_effects_p
(
cond
))
return
true
;
return
true
;
/* Convert a == b ? b : a to "a". */
if
(
true_code
==
EQ
&&
!
side_effects_p
(
cond
)
&&
rtx_equal_p
(
XEXP
(
cond
,
0
),
false
)
&&
rtx_equal_p
(
XEXP
(
cond
,
1
),
true
))
return
false
;
else
if
(
true_code
==
NE
&&
!
side_effects_p
(
cond
)
&&
rtx_equal_p
(
XEXP
(
cond
,
0
),
true
)
&&
rtx_equal_p
(
XEXP
(
cond
,
1
),
false
))
return
true
;
/* Look for cases where we have (abs x) or (neg (abs X)). */
/* Look for cases where we have (abs x) or (neg (abs X)). */
if
(
GET_MODE_CLASS
(
mode
)
==
MODE_INT
if
(
GET_MODE_CLASS
(
mode
)
==
MODE_INT
...
...
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