aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorMostafa Hagog <mustafa@il.ibm.com>2004-03-18 20:09:04 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2004-03-18 15:09:04 -0500
commit2171cb855efea2f8c6b71a5ed57bf97dd358b6c2 (patch)
treecd1cbc7d49c1a314f833bc45f4ecdaf346a9c0c3 /gcc/gcse.c
parent61b28f56bb32aae63c1fba006918b6c60c243c9c (diff)
downloadgcc-2171cb855efea2f8c6b71a5ed57bf97dd358b6c2.zip
gcc-2171cb855efea2f8c6b71a5ed57bf97dd358b6c2.tar.gz
gcc-2171cb855efea2f8c6b71a5ed57bf97dd358b6c2.tar.bz2
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
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index ce4d201..d75d459 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -8319,10 +8319,12 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn,
pat = PATTERN (insn);
dest = SET_DEST (pat);
- /* Check if the loaded register is not used nor killed from the beginning
- of the block. */
+ /* Check that the loaded register is not used, set, or killed from the
+ beginning of the block. */
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;
/* Check potential for replacing load with copy for predecessors. */