From: Richard Henderson Date: Fri, 17 Mar 2000 23:24:30 +0000 (-0800) Subject: rtlanal.c (single_set): Reject if the parallel has anything except SET or USE or... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=787ccee0124924e9a03f6e350cb30b6d9924eb50;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 84cd1bb8810..68ac1f2b7e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-03-17 Richard Henderson + + * rtlanal.c (single_set): Reject if the parallel has anything + except SET or USE or CLOBBER. + 2000-03-17 Jeff Law Richard Henderson 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; }