+2014-03-21 Richard Henderson <rth@twiddle.net>
+
+ PR target/60598
+ * ifcvt.c (dead_or_predicable): Return FALSE if there are any frame
+ related insns after epilogue_completed.
+
2014-03-21 Martin Jambor <mjambor@suse.cz>
PR ipa/59176
end = PREV_INSN (end);
}
+ /* Don't move frame-related insn across the conditional branch. This
+ can lead to one of the paths of the branch having wrong unwind info. */
+ if (epilogue_completed)
+ {
+ rtx insn = head;
+ while (1)
+ {
+ if (INSN_P (insn) && RTX_FRAME_RELATED_P (insn))
+ return FALSE;
+ if (insn == end)
+ break;
+ insn = NEXT_INSN (insn);
+ }
+ }
+
/* Disable handling dead code by conditional execution if the machine needs
to do anything funny with the tests, etc. */
#ifndef IFCVT_MODIFY_TESTS
+2014-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/60598
+ * gcc.dg/pr60598.c: New test.
+
2014-03-21 Martin Jambor <mjambor@suse.cz>
PR ipa/59176
--- /dev/null
+/* PR target/60598 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-fpic" { target fpic } } */
+/* { dg-additional-options "-march=z196 -mtune=zEC12" { target s390*-*-* } } */
+
+struct S { unsigned a, b[32]; };
+
+void
+foo (struct S *x, struct S *y)
+{
+ unsigned a = y->a, i;
+ if (x == y)
+ for (i = 0; i < a - 1 - i; i++)
+ {
+ unsigned t = x->b[i];
+ x->b[i] = x->b[a - 1 - i];
+ x->b[a - 1 - i] = t;
+ }
+ else
+ {
+ x->a = a;
+ for (i = 0; i < a; i++)
+ x->b[i] = y->b[a - 1 - i];
+ }
+}