Commit 2171cb85 by Mostafa Hagog Committed by David Edelsohn

gcse.c (eliminate_partially_redundant_loads): Reject change if dest is set…

gcse.c (eliminate_partially_redundant_loads): Reject change if dest is set between beginning and current insn.

2004-03-18  Mostafa Hagog  <mustafa@il.ibm.com>

        * gcse.c (eliminate_partially_redundant_loads): Reject change if
        dest is set between beginning and current insn.

From-SVN: r79636
parent 61b28f56
2004-03-18 Mostafa Hagog <mustafa@il.ibm.com>
* gcse.c (eliminate_partially_redundant_loads): Reject change if
dest is set between beginning and current insn.
2004-03-18 Mark Mitchell <mark@codesourcery.com> 2004-03-18 Mark Mitchell <mark@codesourcery.com>
* c-decl.c (grokdeclarator): Do not complain about redeclaring * c-decl.c (grokdeclarator): Do not complain about redeclaring
......
...@@ -8319,10 +8319,12 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn, ...@@ -8319,10 +8319,12 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn,
pat = PATTERN (insn); pat = PATTERN (insn);
dest = SET_DEST (pat); dest = SET_DEST (pat);
/* Check if the loaded register is not used nor killed from the beginning /* Check that the loaded register is not used, set, or killed from the
of the block. */ beginning of the block. */
if (reg_used_between_after_reload_p (dest, if (reg_used_between_after_reload_p (dest,
PREV_INSN (BB_HEAD (bb)), insn)) PREV_INSN (BB_HEAD (bb)), insn)
|| reg_set_between_after_reload_p (dest,
PREV_INSN (BB_HEAD (bb)), insn))
return; return;
/* Check potential for replacing load with copy for predecessors. */ /* Check potential for replacing load with copy for predecessors. */
......
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