aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-10-21 10:00:27 +0200
committerRichard Biener <rguenther@suse.de>2021-10-21 10:02:31 +0200
commitd438dd2523a35e073eed04d146f1e73e2514d93d (patch)
treec56b0d030cc206b51e4d0d1bbb9684dd8eb9d270 /gcc
parent2e4659199e814b7ee0f6bd925fd2c0a7610da856 (diff)
downloadgcc-d438dd2523a35e073eed04d146f1e73e2514d93d.zip
gcc-d438dd2523a35e073eed04d146f1e73e2514d93d.tar.gz
gcc-d438dd2523a35e073eed04d146f1e73e2514d93d.tar.bz2
testsuite/102861 - adjust gcc.dg/vect/bb-slp-16.c change
This reverts the bogus previous change causing runtime failures and instead realizes that we now have the loop condition if-converted and the BB vectorization opportunity realized during the loop vectorization pass. 2021-10-21 Richard Biener <rguenther@suse.de> PR testsuite/102861 * gcc.dg/vect/bb-slp-16.c: Revert previous change, scan the vect dump instead.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-16.c73
1 files changed, 32 insertions, 41 deletions
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-16.c b/gcc/testsuite/gcc.dg/vect/bb-slp-16.c
index 4fc176d..82fae06 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-16.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-16.c
@@ -1,4 +1,6 @@
/* { dg-require-effective-target vect_int } */
+/* The SLP vectorization happens as part of the if-converted loop body. */
+/* { dg-additional-options "-fdump-tree-vect-details" } */
#include <stdarg.h>
#include "tree-vect.h"
@@ -16,52 +18,41 @@ main1 (int dummy)
unsigned int *pin = &in[0];
unsigned int *pout = &out[0];
unsigned int a = 0;
-
- i = N;
- if (i > 0)
+
+ for (i = 0; i < N; i++)
{
- do
- {
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- *pout++ = *pin++ + a;
- if (arr[i] = i)
- a = i;
- else
- a = 2;
- }
- while (i < N);
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ *pout++ = *pin++ + a;
+ if (arr[i] = i)
+ a = i;
+ else
+ a = 2;
}
a = 0;
- /* check results: */
- i = N;
- if (i > 0)
+ /* check results: */
+ for (i = 0; i < N; i++)
{
- do
- {
- if (out[i*8] != in[i*8] + a
- || out[i*8 + 1] != in[i*8 + 1] + a
- || out[i*8 + 2] != in[i*8 + 2] + a
- || out[i*8 + 3] != in[i*8 + 3] + a
- || out[i*8 + 4] != in[i*8 + 4] + a
- || out[i*8 + 5] != in[i*8 + 5] + a
- || out[i*8 + 6] != in[i*8 + 6] + a
- || out[i*8 + 7] != in[i*8 + 7] + a)
- abort ();
+ if (out[i*8] != in[i*8] + a
+ || out[i*8 + 1] != in[i*8 + 1] + a
+ || out[i*8 + 2] != in[i*8 + 2] + a
+ || out[i*8 + 3] != in[i*8 + 3] + a
+ || out[i*8 + 4] != in[i*8 + 4] + a
+ || out[i*8 + 5] != in[i*8 + 5] + a
+ || out[i*8 + 6] != in[i*8 + 6] + a
+ || out[i*8 + 7] != in[i*8 + 7] + a)
+ abort ();
- if (arr[i] = i)
- a = i;
- else
- a = 2;
- i++;
- }
- while (i < N);
+ if (arr[i] = i)
+ a = i;
+ else
+ a = 2;
}
return 0;
@@ -76,4 +67,4 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "slp1" } } */
+/* { dg-final { scan-tree-dump-times "optimized: basic block" 1 "vect" } } */