Jamie Prescott wrote:
Is there a reason why something like this would not work?
if (!TARGET_XXX2)
emit_clobber(gen_rtx_REG(CCmode, CC_REGNUM));
emit_insn(gen_addsi3_nc(operands[0], operands[1], operands[2]));
Yes. The optimizer will not know that addsi3_nc uses CC_REGNUM, as it
is not mentioned, so the optimizer will not know that these two RTL
instructions always need to remain next to each other. Any optimization
pass that moves insns around may separate the add from the clobber
resulting in broken code. This is what parallels are for, to make sure
that the clobber and add stay together.
Jim