aboutsummaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorAndrew Macleod <amacleod@redhat.com>2016-05-10 03:30:56 +0000
committerAndrew Macleod <amacleod@redhat.com>2016-05-10 03:30:56 +0000
commit357ceb7fe26970b6c6e12f0bb2ceecab6c6a2454 (patch)
tree48eb1f57289f4e995f069f38213ad5c8a16f0347 /gcc/ira.c
parent5ed230ef2005822d6402118e58a311db2a9cb0c7 (diff)
parent8a50780e586342528692744150d08651fb07fb43 (diff)
update to 2016-05-09ttype-2016-05-03
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ttype-2016-05-03@236057 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index d383a551370..55b4bd700be 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -3742,6 +3742,22 @@ combine_and_move_insns (void)
if (use_insn == BB_HEAD (use_bb))
BB_HEAD (use_bb) = new_insn;
+ /* We know regno dies in use_insn, but inside a loop
+ REG_DEAD notes might be missing when def_insn was in
+ another basic block. However, when we move def_insn into
+ this bb we'll definitely get a REG_DEAD note and reload
+ will see the death. It's possible that update_equiv_regs
+ set up an equivalence referencing regno for a reg set by
+ use_insn, when regno was seen as non-local. Now that
+ regno is local to this block, and dies, such an
+ equivalence is invalid. */
+ if (find_reg_note (use_insn, REG_EQUIV, NULL_RTX))
+ {
+ rtx set = single_set (use_insn);
+ if (set && REG_P (SET_DEST (set)))
+ no_equiv (SET_DEST (set), set, NULL);
+ }
+
ira_reg_equiv[regno].init_insns
= gen_rtx_INSN_LIST (VOIDmode, new_insn, NULL_RTX);
bitmap_set_bit (cleared_regs, regno);