2014-03-06 Jakub Jelinek <jakub@redhat.com>
Backport from mainline
+ 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-11 Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
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-03-06 Jakub Jelinek <jakub@redhat.com>
Backport from mainline
+ 2014-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/43546
+ * gcc.target/i386/pr43546.c: New test.
+
2014-02-12 Jakub Jelinek <jakub@redhat.com>
PR c/60101
--- /dev/null
+/* 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);
+}