This patch fixes PR84534 by XFAILing one test because we are deprecating -maltivec=be when run on LE. The other tests are fixed by not counting xxlor insns. We cannot rely on stable counts of xxlor insns, because we generate them not only when using __builtin_vec_or(), but also whenever we need to copy one vsx reg to another...which can vary depending on previous optimizations, moon phases, etc. Therefore, we just make sure we generate at least one. I'll note I did try adding -dp and seeing which patterns generated the xxlors, but there wasn't a clear match between the xxlor's generated because of the __builtin_vec_or and the reg copies.
Ok for trunk? Peter gcc/testsuite/ PR target/84534 * gcc.target/powerpc/vec-setup-be-long.c: xfail. * gcc.target/powerpc/vsx-vector-6-le.c: Do not count xxlor's. * gcc.target/powerpc/vsx-vector-6-le.p9.c: Likewise. Index: gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c (revision 258038) +++ gcc/testsuite/gcc.target/powerpc/vec-setup-be-long.c (working copy) @@ -1,4 +1,6 @@ -/* { dg-do run { target { powerpc64le*-*-linux* } } } */ +/* Per PR78303, we are deprecating usage of -maltivec=be on little endian, + so XFAIL this test until support is actually removed. */ +/* { dg-do run xfail { powerpc64le*-*-linux* } } } */ /* { dg-require-effective-target vsx_hw } */ /* Disable warnings to squelch deprecation message about -maltivec=be. */ /* { dg-options "-w -O2 -mvsx -maltivec=be" } */ Index: gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c (revision 258038) +++ gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.c (working copy) @@ -9,7 +9,7 @@ /* { dg-final { scan-assembler-times "xvabsdp" 1 } } */ /* { dg-final { scan-assembler-times "xvadddp" 1 } } */ /* { dg-final { scan-assembler-times "xxlnor" 8 } } */ -/* { dg-final { scan-assembler-times "xxlor" 30 } } */ +/* { dg-final { scan-assembler "xxlor" } } */ /* { dg-final { scan-assembler-times "xvcmpeqdp" 5 } } */ /* { dg-final { scan-assembler-times "xvcmpgtdp" 8 } } */ /* { dg-final { scan-assembler-times "xvcmpgedp" 6 } } */ Index: gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c (revision 258038) +++ gcc/testsuite/gcc.target/powerpc/vsx-vector-6-le.p9.c (working copy) @@ -9,7 +9,7 @@ /* { dg-final { scan-assembler-times "xvabsdp" 1 } } */ /* { dg-final { scan-assembler-times "xvadddp" 1 } } */ /* { dg-final { scan-assembler-times "xxlnor" 7 } } */ -/* { dg-final { scan-assembler-times "xxlor" 20 } } */ +/* { dg-final { scan-assembler "xxlor" } } */ /* { dg-final { scan-assembler-times "xvcmpeqdp" 5 } } */ /* { dg-final { scan-assembler-times "xvcmpgtdp" 8 } } */ /* { dg-final { scan-assembler-times "xvcmpgedp" 8 } } */