Commit bbd288a4 by Franz Sirl Committed by Franz Sirl

re PR rtl-optimization/11440 (gcc-3.3.1 miscompiles c++ code with -O2, -fno-gcse cures it)

2003-07-14  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

	PR optimization/11440
	* gcse.c (try_replace_reg): Don't attach notes to ZERO_EXTRACT or
	SIGN_EXTRACT SETs.

From-SVN: r69325
parent 3a009999
2003-07-14 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
PR optimization/11440
* gcse.c (try_replace_reg): Don't attach notes to ZERO_EXTRACT or
SIGN_EXTRACT SETs.
2003-07-14 Alan Modra <amodra@bigpond.net.au> 2003-07-14 Alan Modra <amodra@bigpond.net.au>
* doc/tm.texi (BLOCK_REG_PADDING): Describe. * doc/tm.texi (BLOCK_REG_PADDING): Describe.
......
...@@ -3856,9 +3856,12 @@ try_replace_reg (rtx from, rtx to, rtx insn) ...@@ -3856,9 +3856,12 @@ try_replace_reg (rtx from, rtx to, rtx insn)
&& validate_change (insn, &SET_SRC (set), src, 0)) && validate_change (insn, &SET_SRC (set), src, 0))
success = 1; success = 1;
/* If we've failed to do replacement, have a single SET, and don't already /* If we've failed to do replacement, have a single SET, don't already
have a note, add a REG_EQUAL note to not lose information. */ have a note, and have no special SET, add a REG_EQUAL note to not
if (!success && note == 0 && set != 0) lose information. */
if (!success && note == 0 && set != 0
&& GET_CODE (XEXP (set, 0)) != ZERO_EXTRACT
&& GET_CODE (XEXP (set, 0)) != SIGN_EXTRACT)
note = set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src)); note = set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src));
} }
......
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