re PR rtl-optimization/49452 (comp-goto-2.c regresses in testing)
authorWei Guozhi <carrot@google.com>
Tue, 20 Sep 2011 00:57:39 +0000 (00:57 +0000)
committerWei Guozhi <carrot@gcc.gnu.org>
Tue, 20 Sep 2011 00:57:39 +0000 (00:57 +0000)
PR rtl-optimization/49452
* postreload.c (reload_combine): Invalidate use information when across
volatile insn.

From-SVN: r178995

gcc/ChangeLog
gcc/postreload.c

index ade9a4b..1f2a714 100644 (file)
@@ -1,3 +1,9 @@
+2011-09-20  Wei Guozhi  <carrot@google.com>
+
+       PR rtl-optimization/49452
+       * postreload.c (reload_combine): Invalidate use information when across
+       volatile insn.
+
 2011-09-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
 
        * haifa-sched.c (has_edge_p, prev_non_location_insn, check_cfg):
index 0e50d85..8994366 100644 (file)
@@ -1312,7 +1312,8 @@ reload_combine (void)
         is and then later disable any optimization that would cross it.  */
       if (LABEL_P (insn))
        last_label_ruid = reload_combine_ruid;
-      else if (BARRIER_P (insn))
+      else if (BARRIER_P (insn)
+              || (INSN_P (insn) && volatile_insn_p (PATTERN (insn))))
        for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
          if (! fixed_regs[r])
              reg_state[r].use_index = RELOAD_COMBINE_MAX_USES;