https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107057
--- Comment #6 from Hongtao.liu <crazylht at gmail dot com> --- (In reply to Hongtao.liu from comment #5) > I'm testing > > modified gcc/lra-constraints.cc > @@ -4382,7 +4382,14 @@ curr_insn_transform (bool check_only_p) > (op, (enum reg_class) goal_alt[i]) == NO_REGS) > || no_input_reloads_p)) > { > - rtx tem = force_const_mem (mode, op); > + rtx tem; > + > + /* PR 107057, for same constant pool, don't bother > + force_const_mem again, just reuse the matched op. */ > + if (goal_alt_matches[i] >= 0) > + tem = *curr_id->operand_loc[goal_alt_matches[i]]; > + else > + tem = force_const_mem (mode, op); > > change_p = true; > if (subreg != NULL_RTX) It failed bootstrap since there's are matches ops with differnce mode (define_insn "*fop_xf_4_i387" [(set (match_operand:XF 0 "register_operand" "=f,f") (match_operator:XF 3 "binary_fp_operator" [(float_extend:XF (match_operand:MODEF 1 "nonimmediate_operand" "fm,0")) (match_operand:XF 2 "register_operand" "0,f")]))] I don't know if there're other usages, so for safety, i'll just invalid goal_alt_matches when force_const_mem.