aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2013-02-08 21:59:11 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2013-02-08 21:59:11 +0000
commit25bb0bb5b0d6f5b0e23cd20f77cbddfcb41ca92a (patch)
tree093ae21eea3793a243815803b375c53a1efbd413 /gcc/lra-constraints.c
parenta698cc0308468029029e0501815747284194e407 (diff)
downloadgcc-25bb0bb5b0d6f5b0e23cd20f77cbddfcb41ca92a.zip
gcc-25bb0bb5b0d6f5b0e23cd20f77cbddfcb41ca92a.tar.gz
gcc-25bb0bb5b0d6f5b0e23cd20f77cbddfcb41ca92a.tar.bz2
re PR rtl-optimization/56246 (ICE in assign_by_spills, at lra-assigns.c:1262)
2013-02-08 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/56246 * lra-constraints.c (simplify_operand_subreg): Try tor reuse reload pseudo. * lra.c (lra): Clear lra_optional_reload_pseudos only when all constraints are satisfied. 2013-02-08 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/56246 * gcc.target/i386/pr56246.c: New test. From-SVN: r195902
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r--gcc/lra-constraints.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 13420eb..49c9723 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1213,24 +1213,26 @@ simplify_operand_subreg (int nop, enum machine_mode reg_mode)
enum reg_class rclass
= (enum reg_class) targetm.preferred_reload_class (reg, ALL_REGS);
- new_reg = lra_create_new_reg_with_unique_value (reg_mode, reg, rclass,
- "subreg reg");
- bitmap_set_bit (&lra_optional_reload_pseudos, REGNO (new_reg));
- if (type != OP_OUT
- || GET_MODE_SIZE (GET_MODE (reg)) > GET_MODE_SIZE (mode))
+ if (get_reload_reg (curr_static_id->operand[nop].type, reg_mode, reg,
+ rclass, "subreg reg", &new_reg))
{
- push_to_sequence (before);
- lra_emit_move (new_reg, reg);
- before = get_insns ();
- end_sequence ();
- }
- if (type != OP_IN)
- {
- start_sequence ();
- lra_emit_move (reg, new_reg);
- emit_insn (after);
- after = get_insns ();
- end_sequence ();
+ bitmap_set_bit (&lra_optional_reload_pseudos, REGNO (new_reg));
+ if (type != OP_OUT
+ || GET_MODE_SIZE (GET_MODE (reg)) > GET_MODE_SIZE (mode))
+ {
+ push_to_sequence (before);
+ lra_emit_move (new_reg, reg);
+ before = get_insns ();
+ end_sequence ();
+ }
+ if (type != OP_IN)
+ {
+ start_sequence ();
+ lra_emit_move (reg, new_reg);
+ emit_insn (after);
+ after = get_insns ();
+ end_sequence ();
+ }
}
SUBREG_REG (operand) = new_reg;
lra_process_new_insns (curr_insn, before, after,