Hi All, The given test is intended to test vectorization of a strided access done by having a step of > 1.
GCN target doesn't support load lanes, so the testcase is expected to fail, other targets create a permuted load here which we then then reject. However some GCN arch don't seem to support the permuted loads either, so the vectorizer tries a gather/scatter. But the indices aren't supported by some target, so instead the vectorizer scalarizes the loads. I can't really test for which architecture is being used by the compiler, so instead this updates the testcase to use one single architecture so we get a consistent result. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Cross checked the failing case on amdgcn-amdhsa and all pass now. Ok for master? Thanks, Tamar gcc/testsuite/ChangeLog: PR target/119286 * gcc.dg/vect/vect-early-break_18.c: Force -march=gfx908 for amdgcn. --- diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c index edddb44bad66aa419d097f69ca850e5eaa66e014..cd397049c84c47cbd3e9facb87419de58ba5b148 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c +++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c @@ -2,7 +2,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_early_break } */ /* { dg-require-effective-target vect_int } */ - +/* { dg-additional-options "-march=gfx908" { target amdgcn*-*-* } } */ /* { dg-additional-options "-Ofast" } */ /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_load_lanes } } } */ --
diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c index edddb44bad66aa419d097f69ca850e5eaa66e014..cd397049c84c47cbd3e9facb87419de58ba5b148 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c +++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c @@ -2,7 +2,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_early_break } */ /* { dg-require-effective-target vect_int } */ - +/* { dg-additional-options "-march=gfx908" { target amdgcn*-*-* } } */ /* { dg-additional-options "-Ofast" } */ /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_load_lanes } } } */