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
This commit is contained in:
Richard Henderson 2000-03-17 15:24:30 -08:00 committed by Richard Henderson
parent 7d89dda571
commit 787ccee012
2 changed files with 28 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2000-03-17 Richard Henderson <rth@cygnus.com>
* rtlanal.c (single_set): Reject if the parallel has anything
except SET or USE or CLOBBER.
2000-03-17 Jeff Law <law@cygnus.com>
Richard Henderson <rth@cygnus.com>

View File

@ -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;
}