]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
target/115254 - fix gcc.dg/vect/vect-gather-4.c dump scanning
authorRichard Biener <rguenther@suse.de>
Tue, 28 May 2024 13:55:59 +0000 (15:55 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 28 May 2024 13:59:06 +0000 (15:59 +0200)
The dump scanning is supposed to check that we do not merge two
sligtly different gathers into one SLP node but since we now
SLP the store scanning for "ectorizing stmts using SLP" is no
longer good.  Instead the following makes us look for
"stmt 1 .* = .MASK" which would be how the second lane of an SLP
node looks like.  We have to handle both .MASK_GATHER_LOAD (for
targets with ifun mask gathers) and .MASK_LOAD (for ones without).

Tested on x86_64-linux with and without native gather and on GCN
where this now avoids a FAIL.

PR target/115254
* gcc.dg/vect/vect-gather-4.c: Adjust dump scan.

gcc/testsuite/gcc.dg/vect/vect-gather-4.c

index d18094d69823f96b55d402dedec410e8c8fb0fec..edd9a6783c256ec4b8f9492e00d78df3653361fb 100644 (file)
@@ -45,4 +45,7 @@ f3 (int *restrict y, int *restrict x, int *restrict indices)
     }
 }
 
-/* { dg-final { scan-tree-dump-not "vectorizing stmts using SLP" vect } } */
+/* We do not want to see a two-lane .MASK_LOAD or .MASK_GATHER_LOAD since
+   the gathers are different on each lane.  This is a bit fragile and
+   should possibly be turned into a runtime test.  */
+/* { dg-final { scan-tree-dump-not "stmt 1 \[^\r\n\]* = .MASK" vect } } */