aboutsummaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@redhat.com>2016-12-12 13:29:48 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2016-12-12 13:29:48 +0000
commitfba1216545a21ac5226d88e3ab1878acf08f9bce (patch)
treed78d0be3a9925582b39c44ab96e4f4556b85aae5 /gcc/ira.c
parent8152d6eff66fc2884df825b250ed9e97275b3c94 (diff)
downloadgcc-fba1216545a21ac5226d88e3ab1878acf08f9bce.zip
gcc-fba1216545a21ac5226d88e3ab1878acf08f9bce.tar.gz
gcc-fba1216545a21ac5226d88e3ab1878acf08f9bce.tar.bz2
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
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c8
1 files changed, 8 insertions, 0 deletions
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;