+2015-03-05 Martin Sebor <msebor@redhat.com>
+
+ * PR testsuite/63175
+ * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a.c (main1): Move
+ checking of results into main to prevent it from getting optimized
+ away.
+ * gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a-pr63175.c: New test.
+
2015-03-06 Wilco Dijkstra <wilco.dijkstra@arm.com>
* gcc.dg/tree-ssa/pr45685.c: Move to gcc.target/i386.
--- /dev/null
+/* { dg-require-effective-target vect_int } */
+/* { dg-do compile } */
+
+#define N 16
+
+const unsigned int in[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+unsigned int out[N];
+
+__attribute__ ((noinline)) int
+main1 (void)
+{
+ const unsigned int *pin = &in[1];
+ unsigned int *pout = &out[0];
+
+ /* Misaligned load. */
+ *pout++ = *pin++;
+ *pout++ = *pin++;
+ *pout++ = *pin++;
+ *pout++ = *pin++;
+
+ return 0;
+}
+
+/* Verify that the assembly contains vector instructions alone
+ with no word loads (lw, lwu, lwz, lwzu, or their indexed forms)
+ or word stores (stw, stwu, stwx, stwux, or their indexed forms). */
+
+/* { dg-final { scan-assembler "\t\(lxv|lvsr|stxv\)" } } */
+/* { dg-final { scan-assembler-not "\tlwz?u?x? " } } */
+/* { dg-final { scan-assembler-not "\tstwu?x? " } } */
/* { dg-require-effective-target vect_int } */
-#include <stdarg.h>
#include "../../tree-vect.h"
#define N 16
unsigned int in[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
__attribute__ ((noinline)) int
-main1 (unsigned int x, unsigned int y)
+main1 (void)
{
- int i;
unsigned int *pin = &in[1];
unsigned int *pout = &out[0];
- unsigned int a0, a1, a2, a3;
/* Misaligned load. */
*pout++ = *pin++;
*pout++ = *pin++;
*pout++ = *pin++;
- /* Check results. */
- if (out[0] != in[1]
- || out[1] != in[2]
- || out[2] != in[3]
- || out[3] != in[4])
- abort();
-
return 0;
}
{
check_vect ();
- main1 (2, 3);
+ main1 ();
+
+ /* Check results. */
+ if (out[0] != in[1]
+ || out[1] != in[2]
+ || out[2] != in[3]
+ || out[3] != in[4])
+ abort();
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp2" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" { xfail vect_no_align } } } */
/* { dg-final { cleanup-tree-dump "slp2" } } */
-