https://gcc.gnu.org/g:70480055636c2ca79761cb4440e930daa16bb7aa
commit r15-1607-g70480055636c2ca79761cb4440e930daa16bb7aa Author: Thomas Schwinge <tschwi...@baylibre.com> Date: Tue Jun 25 10:55:41 2024 +0200 rs6000: Properly default-disable late-combine passes [PR106594, PR115622, PR115633] ..., 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. Diff: --- gcc/config/rs6000/rs6000.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index cd14e5a34ed..71fe31297cf 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -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