]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000: Properly default-disable late-combine passes [PR106594, PR115622, PR115633]
authorThomas Schwinge <tschwinge@baylibre.com>
Tue, 25 Jun 2024 08:55:41 +0000 (10:55 +0200)
committerThomas Schwinge <tschwinge@baylibre.com>
Tue, 25 Jun 2024 09:41:50 +0000 (11:41 +0200)
..., so that it also works for '__attribute__ ((optimize("[...]")))' etc.

PR target/106594
PR target/115622
PR target/115633
gcc/
* config/rs6000/rs6000.cc (rs6000_option_override_internal): Move
default-disable of late-combine passes from here...
(rs6000_override_options_after_change): ... to here.

gcc/config/rs6000/rs6000.cc

index cd14e5a34ed52ae2627821b56fc546f2701859ce..71fe31297cfb80fa726c93435e88d057e814da6e 100644 (file)
@@ -3434,6 +3434,14 @@ rs6000_override_options_after_change (void)
   /* If we are inserting ROP-protect instructions, disable shrink wrap.  */
   if (rs6000_rop_protect)
     flag_shrink_wrap = 0;
+
+  /* One of the late-combine passes runs after register allocation
+     and can match define_insn_and_splits that were previously used
+     only before register allocation.  Some of those define_insn_and_splits
+     use gen_reg_rtx unconditionally.  Disable late-combine by default
+     until the define_insn_and_splits are fixed.  */
+  if (!OPTION_SET_P (flag_late_combine_instructions))
+    flag_late_combine_instructions = 0;
 }
 
 #ifdef TARGET_USES_LINUX64_OPT
@@ -4771,14 +4779,6 @@ rs6000_option_override_internal (bool global_init_p)
        targetm.expand_builtin_va_start = NULL;
     }
 
-  /* One of the late-combine passes runs after register allocation
-     and can match define_insn_and_splits that were previously used
-     only before register allocation.  Some of those define_insn_and_splits
-     use gen_reg_rtx unconditionally.  Disable late-combine by default
-     until the define_insn_and_splits are fixed.  */
-  if (!OPTION_SET_P (flag_late_combine_instructions))
-    flag_late_combine_instructions = 0;
-
   rs6000_override_options_after_change ();
 
   /* If not explicitly specified via option, decide whether to generate indexed