summaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-25 17:58:35 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-25 17:58:35 +0000
commitc2b94990bc7e4a24951982c218d016c8d1140740 (patch)
treec4b239ce2edafdf308b2a5765ce2570f123192aa /gcc/lra-constraints.c
parent18cefec0dfd82e5358cc61baee4624035b5d8adf (diff)
downloadgcc-c2b94990bc7e4a24951982c218d016c8d1140740.tar.gz
2015-11-25 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/67954 * lra-constraints.c (curr_insn_transform): Add check on scratch pseudo when change class to NO_REGS. Add an assert. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230894 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r--gcc/lra-constraints.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 4670e811b3a..c62bf6a2cea 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -3725,7 +3725,8 @@ curr_insn_transform (bool check_only_p)
assigment pass and the scratch pseudo will be
spilled. Spilled scratch pseudos are transformed
back to scratches at the LRA end. */
- && lra_former_scratch_operand_p (curr_insn, i))
+ && lra_former_scratch_operand_p (curr_insn, i)
+ && lra_former_scratch_p (REGNO (op)))
{
int regno = REGNO (op);
lra_change_class (regno, NO_REGS, " Change to", true);
@@ -3734,6 +3735,8 @@ curr_insn_transform (bool check_only_p)
spilled pseudo as there is only one such insn, the
current one. */
reg_renumber[regno] = -1;
+ lra_assert (bitmap_single_bit_set_p
+ (&lra_reg_info[REGNO (op)].insn_bitmap));
}
/* We can do an optional reload. If the pseudo got a hard
reg, we might improve the code through inheritance. If