Commit 109374e2 by Richard Sandiford Committed by Richard Sandiford

emit-rtl.c (set_unique_reg_note): Discard notes with side effects.

gcc/
	* emit-rtl.c (set_unique_reg_note): Discard notes with side effects.

From-SVN: r214609
parent b7679d96
2014-08-27 Richard Sandiford <rdsandiford@googlemail.com>
* emit-rtl.c (set_unique_reg_note): Discard notes with side effects.
2014-08-27 David Malcolm <dmalcolm@redhat.com> 2014-08-27 David Malcolm <dmalcolm@redhat.com>
* rtl.h (JUMP_LABEL_AS_INSN): New. * rtl.h (JUMP_LABEL_AS_INSN): New.
......
...@@ -5181,6 +5181,14 @@ set_unique_reg_note (rtx insn, enum reg_note kind, rtx datum) ...@@ -5181,6 +5181,14 @@ set_unique_reg_note (rtx insn, enum reg_note kind, rtx datum)
It serves no useful purpose and breaks eliminate_regs. */ It serves no useful purpose and breaks eliminate_regs. */
if (GET_CODE (datum) == ASM_OPERANDS) if (GET_CODE (datum) == ASM_OPERANDS)
return NULL_RTX; return NULL_RTX;
/* Notes with side effects are dangerous. Even if the side-effect
initially mirrors one in PATTERN (INSN), later optimizations
might alter the way that the final register value is calculated
and so move or alter the side-effect in some way. The note would
then no longer be a valid substitution for SET_SRC. */
if (side_effects_p (datum))
return NULL_RTX;
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment