]> gcc.gnu.org Git - gcc.git/commitdiff
Revert "Revert "combine: Don't combine if I2 does not change""
authorRichard Biener <rguenther@suse.de>
Tue, 7 May 2024 08:14:19 +0000 (10:14 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 7 May 2024 08:15:20 +0000 (10:15 +0200)
This reverts commit 109f1b28fc94c93096506e3df0c25e331cef19d0.

gcc/combine.cc

index 92b8d98e6c153938ca662df51cd8d5da4c90f9e0..71c9abc145c21d44da1862d54b9adc2d728c038a 100644 (file)
@@ -4196,6 +4196,17 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
       adjust_for_new_dest (i3);
     }
 
+  /* If I2 didn't change, this is not a combination (but a simplification or
+     canonicalisation with context), which should not be done here.  Doing
+     it here explodes the algorithm.  Don't.  */
+  if (rtx_equal_p (newi2pat, PATTERN (i2)))
+    {
+      if (dump_file)
+       fprintf (dump_file, "i2 didn't change, not doing this\n");
+      undo_all ();
+      return 0;
+    }
+
   /* We now know that we can do this combination.  Merge the insns and
      update the status of registers and LOG_LINKS.  */
 
This page took 0.076831 seconds and 5 git commands to generate.