Followup to r16-1613-g34e1e5e33ec3eb. remove_reg_equal_equiv_notes's 2nd argument is 'no_rescan' which we accidentally had on, tripping an assert in combine or ira because we hadn't left things in a consistent state.
Fix the thinko by enabling rescanning. gcc/ChangeLog: PR rtl-optimization/120795 * ext-dce.cc (ext_dce_try_optimize_insn): Enable rescan in remove_reg_equal_equiv_notes call. Co-authored-by: Jeff Law <j...@ventanamicro.com> --- Preapproved by Jeff on the PR. Regtested on x86_64-pc-linux-gnu. Jeff guessed the actual problem straight away and did the real work. Pushed. gcc/ext-dce.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ext-dce.cc b/gcc/ext-dce.cc index b1d5ee4b36c4..df17b018bf1f 100644 --- a/gcc/ext-dce.cc +++ b/gcc/ext-dce.cc @@ -446,7 +446,7 @@ ext_dce_try_optimize_insn (rtx_insn *insn, rtx set) /* INSN may have a REG_EQUAL note indicating that the value was sign or zero extended. That note is no longer valid since we've just removed the extension. Just wipe the notes. */ - remove_reg_equal_equiv_notes (insn, true); + remove_reg_equal_equiv_notes (insn, false); } else { base-commit: d0142e147486e6f319704d35930720f6dec648fb -- 2.50.0