(move_movables): Delete REG_EQUAL notes that describe a
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 8 Jun 1993 21:57:08 +0000 (14:57 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 8 Jun 1993 21:57:08 +0000 (14:57 -0700)
non loop invariant value.

From-SVN: r4653

gcc/loop.c

index 84a6fdf51cc9ea94a20781603674e96e642aa619..ad82384c148f1e74378ee10d24ab933cf56695d6 100644 (file)
@@ -1824,6 +1824,16 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs)
 
                      REG_NOTES (i1) = REG_NOTES (p);
 
+                     /* 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.
+                        It is possible for cse to create such notes
+                        like this as a result of record_jump_cond.  */
+                     
+                     if ((temp = find_reg_note (i1, REG_EQUAL, NULL_RTX))
+                         && ! invariant_p (XEXP (temp, 0)))
+                       remove_note (i1, temp);
+
                      if (new_start == 0)
                        new_start = i1;