9b63bb45db0a771922d9ec6f751912b084c62dc5
1 /* { dg-do run { target { powerpc64le-*-* } } } */
2 /* { dg-require-effective-target powerpc_altivec_ok } */
3 /* { dg-options "-O2 -mdejagnu-cpu=power8 -maltivec" } */
5 /* The expansion for vector character multiply introduces a vperm operation.
6 This tests that the swap optimization to remove swaps by changing the
7 vperm mask results in correct code. */
13 vector
unsigned char r
;
14 vector
unsigned char v
=
15 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
16 vector
unsigned char i
=
17 { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
18 vector
unsigned char e
=
19 {0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132, 156, 182, 210, 240};
25 if (!vec_all_eq (r
, e
))