re PR target/43546 (ICE: in assign_stack_local_1, at function.c:353 with -mpreferred-stack-boundary=2 -msseregparm)
PR target/43546 * expr.c (compress_float_constant): If x is a hard register, extend into a pseudo and then move to x. * gcc.target/i386/pr43546.c: New test. From-SVN: r207757
This commit is contained in:
parent
e697d1191c
commit
a4d70cfae3
@ -1,3 +1,9 @@
|
||||
2014-02-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/43546
|
||||
* expr.c (compress_float_constant): If x is a hard register,
|
||||
extend into a pseudo and then move to x.
|
||||
|
||||
2014-02-13 Dominik Vogt <vogt@linux.vnet.ibm.com>
|
||||
|
||||
* config/s390/s390.c (s390_asm_output_function_label): Fix crash
|
||||
|
13
gcc/expr.c
13
gcc/expr.c
@ -3726,12 +3726,21 @@ compress_float_constant (rtx x, rtx y)
|
||||
into a new pseudo. This constant may be used in different modes,
|
||||
and if not, combine will put things back together for us. */
|
||||
trunc_y = force_reg (srcmode, trunc_y);
|
||||
emit_unop_insn (ic, x, trunc_y, UNKNOWN);
|
||||
|
||||
/* If x is a hard register, perform the extension into a pseudo,
|
||||
so that e.g. stack realignment code is aware of it. */
|
||||
rtx target = x;
|
||||
if (REG_P (x) && HARD_REGISTER_P (x))
|
||||
target = gen_reg_rtx (dstmode);
|
||||
|
||||
emit_unop_insn (ic, target, trunc_y, UNKNOWN);
|
||||
last_insn = get_last_insn ();
|
||||
|
||||
if (REG_P (x))
|
||||
if (REG_P (target))
|
||||
set_unique_reg_note (last_insn, REG_EQUAL, y);
|
||||
|
||||
if (target != x)
|
||||
return emit_move_insn (x, target);
|
||||
return last_insn;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2014-02-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/43546
|
||||
* gcc.target/i386/pr43546.c: New test.
|
||||
|
||||
2014-02-13 Dominik Vogt <vogt@linux.vnet.ibm.com>
|
||||
|
||||
* gcc.target/s390/hotpatch-compile-8.c: New test.
|
||||
|
12
gcc/testsuite/gcc.target/i386/pr43546.c
Normal file
12
gcc/testsuite/gcc.target/i386/pr43546.c
Normal file
@ -0,0 +1,12 @@
|
||||
/* PR target/43546 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O1" } */
|
||||
/* { dg-additional-options "-mpreferred-stack-boundary=2 -msseregparm -msse" { target ia32 } } */
|
||||
|
||||
extern void bar (double);
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
bar (1.0);
|
||||
}
|
Loading…
Reference in New Issue
Block a user