From fba1216545a21ac5226d88e3ab1878acf08f9bce Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Mon, 12 Dec 2016 13:29:48 +0000 Subject: re PR rtl-optimization/78669 (ICE: in combine_and_move_insns, at ira.c:3665 with -Os -fno-tree-ter -mavx512bw) PR rtl-optimization/78669 * ira.c (combine_and_move_insns): When deleting an insn, clear the replace flag for all used regs in that insn. PR rtl-optimization/78669 * gcc.target/i386/pr78669.c: New test. From-SVN: r243551 --- gcc/ira.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/ira.c') diff --git a/gcc/ira.c b/gcc/ira.c index 4a95e3d..5823d5c 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -3714,6 +3714,14 @@ combine_and_move_insns (void) remove_death (regno, use_insn); SET_REG_N_REFS (regno, 0); REG_FREQ (regno) = 0; + df_ref use; + FOR_EACH_INSN_USE (use, def_insn) + { + unsigned int use_regno = DF_REF_REGNO (use); + if (!HARD_REGISTER_NUM_P (use_regno)) + reg_equiv[use_regno].replace = 0; + } + delete_insn (def_insn); reg_equiv[regno].init_insns = NULL; -- cgit v1.1