The following patch was approved offline by Segher to fix PR84365. The problem is when compiling with -mcpu=power9, we don't generate the LE unfriendly lxvd2x and instead emit an LE friendly lxv insn.
Peter PR target/84365 * gcc.target/powerpc/altivec-7-le.c: Also match lxv when compiling with -mcpu=power9. Index: gcc/testsuite/gcc.target/powerpc/altivec-7-le.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/altivec-7-le.c (revision 257640) +++ gcc/testsuite/gcc.target/powerpc/altivec-7-le.c (revision 257641) @@ -22,7 +22,7 @@ /* { dg-final { scan-assembler-times "vpkpx" 2 } } */ /* { dg-final { scan-assembler-times "vmulesb" 1 } } */ /* { dg-final { scan-assembler-times "vmulosb" 1 } } */ -/* { dg-final { scan-assembler-times "lxvd2x" 36 } } */ +/* { dg-final { scan-assembler-times {\mlxvd2x\M|\mlxv\M} 36 } } */ /* { dg-final { scan-assembler-times "lvewx" 2 } } */ /* { dg-final { scan-assembler-times "lvxl" 1 } } */ /* { dg-final { scan-assembler-times "vupklsh" 1 } } */