6d262e3fa61c9c56721d0289b70576184e653442
1 /* { dg-do compile { target { powerpc64le-*-* } } } */
2 /* { dg-options "-O2 -mdejagnu-cpu=power8 -maltivec -mcmodel=large" } */
4 /* The expansion for vector character multiply introduces a vperm operation.
5 This tests that changing the vperm mask allows us to remove all swaps
6 from the generated code. It is a duplicate of swaps-p8-21.c, except
7 that it applies the large code model, which requires an extra indirection
8 in the load of the constant mask. */
14 vector
unsigned char r
;
15 vector
unsigned char v
=
16 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
17 vector
unsigned char i
=
18 { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
27 /* { dg-final { scan-assembler-times "vperm" 1 } } */
28 /* { dg-final { scan-assembler-not "xxpermdi" } } */