projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3b1af4
)
compare-elim: Fix an RTL checking failure
author
Richard Sandiford
<richard.sandiford@arm.com>
Wed, 1 Feb 2023 09:53:50 +0000
(09:53 +0000)
committer
Richard Sandiford
<richard.sandiford@arm.com>
Wed, 1 Feb 2023 09:53:50 +0000
(09:53 +0000)
find_flags_uses_in_insn used SET_SRC without first checking
for a SET. This showed up as an RTL checking failure in
g++.dg/torture/pr90994.C on aarch64.
gcc/
* compare-elim.cc (find_flags_uses_in_insn): Guard use of SET_SRC.
gcc/compare-elim.cc
patch
|
blob
|
history
diff --git
a/gcc/compare-elim.cc
b/gcc/compare-elim.cc
index
5cbd2c0
..
c59dc0c
100644
(file)
--- a/
gcc/compare-elim.cc
+++ b/
gcc/compare-elim.cc
@@
-254,7
+254,8
@@
find_flags_uses_in_insn (struct comparison *cmp, rtx_insn *insn)
x = PATTERN (insn);
if (GET_CODE (x) == PARALLEL)
x = XVECEXP (x, 0, 0);
- x = SET_SRC (x);
+ if (GET_CODE (x) == SET)
+ x = SET_SRC (x);
if (GET_CODE (x) == IF_THEN_ELSE)
x = XEXP (x, 0);
if (COMPARISON_P (x)