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
ad25ba17
Commit
ad25ba17
authored
Jan 23, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(simplify_comparison): Can remove NOT on both operands if we swap
comparison code. From-SVN: r6410
parent
2f607b94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
gcc/combine.c
+8
-7
No files found.
gcc/combine.c
View file @
ad25ba17
...
@@ -8429,7 +8429,7 @@ simplify_comparison (code, pop0, pop1)
...
@@ -8429,7 +8429,7 @@ simplify_comparison (code, pop0, pop1)
&&
GET_CODE
(
XEXP
(
XEXP
(
op0
,
0
),
0
))
==
SUBREG
&&
GET_CODE
(
XEXP
(
XEXP
(
op0
,
0
),
0
))
==
SUBREG
&&
GET_CODE
(
XEXP
(
XEXP
(
op1
,
0
),
0
))
==
SUBREG
&&
GET_CODE
(
XEXP
(
XEXP
(
op1
,
0
),
0
))
==
SUBREG
&&
(
GET_MODE
(
SUBREG_REG
(
XEXP
(
XEXP
(
op0
,
0
),
0
)))
&&
(
GET_MODE
(
SUBREG_REG
(
XEXP
(
XEXP
(
op0
,
0
),
0
)))
==
GET_MODE
(
SUBREG_REG
(
XEXP
(
XEXP
(
op
0
,
0
),
0
))))
==
GET_MODE
(
SUBREG_REG
(
XEXP
(
XEXP
(
op
1
,
0
),
0
))))
&&
GET_CODE
(
XEXP
(
op0
,
1
))
==
CONST_INT
&&
GET_CODE
(
XEXP
(
op0
,
1
))
==
CONST_INT
&&
GET_CODE
(
XEXP
(
op1
,
1
))
==
CONST_INT
&&
GET_CODE
(
XEXP
(
op1
,
1
))
==
CONST_INT
&&
GET_CODE
(
XEXP
(
XEXP
(
op0
,
0
),
1
))
==
CONST_INT
&&
GET_CODE
(
XEXP
(
XEXP
(
op0
,
0
),
1
))
==
CONST_INT
...
@@ -8517,12 +8517,13 @@ simplify_comparison (code, pop0, pop1)
...
@@ -8517,12 +8517,13 @@ simplify_comparison (code, pop0, pop1)
code
=
unsigned_condition
(
code
);
code
=
unsigned_condition
(
code
);
}
}
/* If both operands are NOT or both are NEG, we can strip off the
/* If both operands are NOT, we can strip off the outer operation
outer operation if this is just an equality comparison. */
and adjust the comparison code for swapped operands; similarly for
else
if
((
code
==
EQ
||
code
==
NE
)
NEG, except that this must be an equality comparison. */
&&
((
GET_CODE
(
op0
)
==
NOT
&&
GET_CODE
(
op1
)
==
NOT
)
else
if
((
GET_CODE
(
op0
)
==
NOT
&&
GET_CODE
(
op1
)
==
NOT
)
||
(
GET_CODE
(
op0
)
==
NEG
&&
GET_CODE
(
op1
)
==
NEG
)))
||
(
GET_CODE
(
op0
)
==
NEG
&&
GET_CODE
(
op1
)
==
NEG
op0
=
XEXP
(
op0
,
0
),
op1
=
XEXP
(
op1
,
0
);
&&
(
code
==
EQ
||
code
==
NE
)))
op0
=
XEXP
(
op0
,
0
),
op1
=
XEXP
(
op1
,
0
),
code
=
swap_condition
(
code
);
else
else
break
;
break
;
...
...
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