aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-03-17 15:24:30 -0800
committerRichard Henderson <rth@gcc.gnu.org>2000-03-17 15:24:30 -0800
commit787ccee0124924e9a03f6e350cb30b6d9924eb50 (patch)
tree12ce3ec806bf4247c716bb8a833b7b29f9d35843 /gcc/rtlanal.c
parent7d89dda571403fb5293782e4786738ef189b85b3 (diff)
downloadgcc-787ccee0124924e9a03f6e350cb30b6d9924eb50.zip
gcc-787ccee0124924e9a03f6e350cb30b6d9924eb50.tar.gz
gcc-787ccee0124924e9a03f6e350cb30b6d9924eb50.tar.bz2
rtlanal.c (single_set): Reject if the parallel has anything except SET or USE or CLOBBER.
* rtlanal.c (single_set): Reject if the parallel has anything except SET or USE or CLOBBER. From-SVN: r32614
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 5c7e527..b10a3bf 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -703,16 +703,30 @@ single_set (insn)
else if (GET_CODE (PATTERN (insn)) == PARALLEL)
{
for (i = 0, set = 0; i < XVECLEN (PATTERN (insn), 0); i++)
- if (GET_CODE (XVECEXP (PATTERN (insn), 0, i)) == SET
- && (! find_reg_note (insn, REG_UNUSED,
- SET_DEST (XVECEXP (PATTERN (insn), 0, i)))
- || side_effects_p (XVECEXP (PATTERN (insn), 0, i))))
- {
- if (set)
+ {
+ rtx sub = XVECEXP (PATTERN (insn), 0, i);
+
+ switch (GET_CODE (sub))
+ {
+ case USE:
+ case CLOBBER:
+ break;
+
+ case SET:
+ if (! find_reg_note (insn, REG_UNUSED, SET_DEST (sub))
+ || side_effects_p (sub))
+ {
+ if (set)
+ return 0;
+ else
+ set = sub;
+ }
+ break;
+
+ default:
return 0;
- else
- set = XVECEXP (PATTERN (insn), 0, i);
- }
+ }
+ }
return set;
}