Commit a4d70cfa by Jakub Jelinek Committed by Jakub Jelinek

re PR target/43546 (ICE: in assign_stack_local_1, at function.c:353 with…

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
parent e697d119
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
......
......@@ -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;
}
......
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.
......
/* 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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment