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
This commit is contained in:
parent
a698cc0308
commit
25bb0bb5b0
@ -1,3 +1,11 @@
|
||||
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 Jeff Law <law@redhat.com>
|
||||
|
||||
PR debug/53948
|
||||
|
@ -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,
|
||||
|
@ -2272,7 +2272,6 @@ lra (FILE *f)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
bitmap_clear (&lra_optional_reload_pseudos);
|
||||
/* We should try to assign hard registers to scratches even
|
||||
if there were no RTL transformations in
|
||||
lra_constraints. */
|
||||
@ -2311,6 +2310,7 @@ lra (FILE *f)
|
||||
live_p = false;
|
||||
}
|
||||
}
|
||||
bitmap_clear (&lra_optional_reload_pseudos);
|
||||
bitmap_clear (&lra_inheritance_pseudos);
|
||||
bitmap_clear (&lra_split_regs);
|
||||
if (! lra_need_for_spills_p ())
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-02-08 Vladimir Makarov <vmakarov@redhat.com>
|
||||
|
||||
PR rtl-optimization/56246
|
||||
* gcc.target/i386/pr56246.c: New test.
|
||||
|
||||
2013-02-08 Jeff Law <law@redhat.com>
|
||||
|
||||
PR debug/53948
|
||||
|
7
gcc/testsuite/gcc.target/i386/pr56246.c
Normal file
7
gcc/testsuite/gcc.target/i386/pr56246.c
Normal file
@ -0,0 +1,7 @@
|
||||
/* PR target/56225 */
|
||||
/* { dg-do compile { target { ia32 } } } */
|
||||
/* { dg-options "-O2 -fno-omit-frame-pointer -march=i686 -fpic" } */
|
||||
|
||||
void NoBarrier_AtomicExchange (long long *ptr) {
|
||||
while (__sync_val_compare_and_swap (ptr, 1, 0) );
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user