]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR rtl-opt/70061
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Mar 2016 11:48:57 +0000 (11:48 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Mar 2016 11:48:57 +0000 (11:48 +0000)
  * tree-outofssa.c (emit_partition_copy): Flush pending stack adjust.
  (insert_value_copy_on_edge): Likewise.

  * gcc.c-torture/compile/pr70061.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234025 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr70061.c [new file with mode: 0644]
gcc/tree-outof-ssa.c

index dac4a193e687a0744deb5b51506f40b11087db4b..0fe90a6ac10d96dea21f23a48ac9a3f183463d65 100644 (file)
@@ -1,3 +1,9 @@
+2016-03-07  Richard Henderson  <rth@redhat.com>
+
+       PR rtl-opt/70061
+       * tree-outofssa.c (emit_partition_copy): Flush pending stack adjust.
+       (insert_value_copy_on_edge): Likewise.
+
 2016-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * config/arm/arm_neon.h: Show error if using with soft-float ABI.
index e3ed862cc88beafa3ae3336adcb5ab2359bd7d75..952bfeb700aa808527c026b56fa005f328410f59 100644 (file)
@@ -1,3 +1,7 @@
+2016-03-07  Richard Henderson  <rth@redhat.com>
+
+       * gcc.c-torture/compile/pr70061.c: New test.
+
 2016-03-07  Richard Biener  <rguenther@suse.de>
 
        PR testsuite/70109
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr70061.c b/gcc/testsuite/gcc.c-torture/compile/pr70061.c
new file mode 100644 (file)
index 0000000..a7ebcfc
--- /dev/null
@@ -0,0 +1,10 @@
+typedef int v8si __attribute__ ((vector_size (32)));
+
+int
+foo(v8si c, v8si d)
+{
+l0:
+  if (c[2])
+    d ^= c;
+  return d[3];
+}
index 25286a23356f4bf05bae813d93d82fa9aa74be22..41255293e3e41f787318bde0f1669685deeed26b 100644 (file)
@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-ssa-ter.h"
 #include "tree-ssa-coalesce.h"
 #include "tree-outof-ssa.h"
+#include "dojump.h"
 
 /* FIXME: A lot of code here deals with expanding to RTL.  All that code
    should be in cfgexpand.c.  */
@@ -220,6 +221,7 @@ emit_partition_copy (rtx dest, rtx src, int unsignedsrcp, tree sizeexp)
     }
   else
     emit_move_insn (dest, src);
+  do_pending_stack_adjust ();
 
   rtx_insn *seq = get_insns ();
   end_sequence ();
@@ -312,6 +314,8 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
 
   if (x != dest_rtx)
     emit_move_insn (dest_rtx, x);
+  do_pending_stack_adjust ();
+
   seq = get_insns ();
   end_sequence ();