summaryrefslogtreecommitdiff
path: root/gcc/unroll.c
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2002-10-05 04:06:17 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2002-10-05 04:06:17 +0000
commit6d470b777dc74e418c501b730f021381bd010d5a (patch)
tree3f0ddf460aba7b63916a785d2153b6c8afca5dba /gcc/unroll.c
parent733997eb1ba0d406e937918165a37cbc88a9f0fd (diff)
downloadgcc-6d470b777dc74e418c501b730f021381bd010d5a.tar.gz
* unroll.c (copy_loop_body): Remove REG_EQUAL note attached to
copied instruction if the note is not loop invariant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57834 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 97e646eb25c..3e5ea7f069a 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -2033,6 +2033,13 @@ copy_loop_body (loop, copy_start, copy_end, map, exit_label, last_iteration,
REG_NOTES (copy) = initial_reg_note_copy (REG_NOTES (insn), map);
INSN_SCOPE (copy) = INSN_SCOPE (insn);
+ /* If there is a REG_EQUAL note present whose value
+ is not loop invariant, then delete it, since it
+ may cause problems with later optimization passes. */
+ if ((tem = find_reg_note (copy, REG_EQUAL, NULL_RTX))
+ && !loop_invariant_p (loop, XEXP (tem, 0)))
+ remove_note (copy, tem);
+
#ifdef HAVE_cc0
/* If this insn is setting CC0, it may need to look at
the insn that uses CC0 to see what type of insn it is.