From: Richard Biener Date: Thu, 21 Oct 2021 08:00:27 +0000 (+0200) Subject: testsuite/102861 - adjust gcc.dg/vect/bb-slp-16.c change X-Git-Tag: basepoints/gcc-13~3720 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d438dd2523a35e073eed04d146f1e73e2514d93d;p=thirdparty%2Fgcc.git 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 PR testsuite/102861 * gcc.dg/vect/bb-slp-16.c: Revert previous change, scan the vect dump instead. --- diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-16.c b/gcc/testsuite/gcc.dg/vect/bb-slp-16.c index 4fc176dde842..82fae06e3244 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 #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" } } */