From d8d70b783765361a8acef70fc9b54db526cd6ff5 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 28 May 2024 15:55:59 +0200 Subject: [PATCH] target/115254 - fix gcc.dg/vect/vect-gather-4.c dump scanning 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/vect/vect-gather-4.c b/gcc/testsuite/gcc.dg/vect/vect-gather-4.c index d18094d69823..edd9a6783c25 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-gather-4.c +++ b/gcc/testsuite/gcc.dg/vect/vect-gather-4.c @@ -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 } } */ -- 2.47.2