diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/gcse.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fe19b78..765eca8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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> * c-decl.c (grokdeclarator): Do not complain about redeclaring @@ -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. */ |