4 /* { dg-require-effective-target vmx_hw } */
5 /* { dg-options "-maltivec -O2 -save-temps" } */
9 __attribute__((noinline
)) void
12 volatile vector
unsigned char v0
= {1, 0, 0, 0, 0, 0, 0, 0};
13 volatile vector
unsigned char v1
= {0xff, 0, 0, 0, 0, 0, 0, 0};
14 vector
unsigned short res
= vec_vmuleub (v0
, v1
);
15 if (res
[0] != (unsigned short)v0
[0] * (unsigned short)v1
[0])
19 __attribute__((noinline
)) void
22 volatile vector
unsigned char v0
= {0, 1, 0, 0, 0, 0, 0, 0};
23 volatile vector
unsigned char v1
= {0, 0xff, 0, 0, 0, 0, 0, 0};
24 vector
unsigned short res
= vec_vmuloub (v0
, v1
);
25 if (res
[0] != (unsigned short)v0
[1] * (unsigned short)v1
[1])
29 __attribute__((noinline
)) void
32 volatile vector
unsigned short v0
= {1, 0, 0, 0};
33 volatile vector
unsigned short v1
= {0xff, 0, 0, 0};
34 vector
unsigned int res
= vec_vmuleuh (v0
, v1
);
35 if (res
[0] != (unsigned int)v0
[0] * (unsigned int)v1
[0])
39 __attribute__((noinline
)) void
42 volatile vector
unsigned short v0
= {0, 1, 0, 0};
43 volatile vector
unsigned short v1
= {0, 0xff, 0, 0};
44 vector
unsigned int res
= vec_vmulouh (v0
, v1
);
45 if (res
[0] != (unsigned int)v0
[1] * (unsigned int)v1
[1])
57 /* { dg-final { scan-assembler-times "vmuleub" 1 } } */
58 /* { dg-final { scan-assembler-times "vmuloub" 1 } } */
59 /* { dg-final { scan-assembler-times "vmuleuh" 1 } } */
60 /* { dg-final { scan-assembler-times "vmulouh" 1 } } */