diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-17 23:24:30 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-17 23:24:30 +0000 |
commit | 93127143e50862972fb286f3631d8e774a1d1b3d (patch) | |
tree | 12ce3ec806bf4247c716bb8a833b7b29f9d35843 /gcc/rtlanal.c | |
parent | 0e1a497c236d6916e2e88d5425a5db8fbdc5e19c (diff) | |
download | gcc-93127143e50862972fb286f3631d8e774a1d1b3d.tar.gz |
* rtlanal.c (single_set): Reject if the parallel has anything
except SET or USE or CLOBBER.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32614 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 5c7e527c80f..b10a3bf3438 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; } |