[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-sub-short.c
blob67052a2474d05c3180b14fccd22f1c6e1a61b413
1 /* Verify that overloaded built-ins for vec_sub with short
2 inputs produce the right results. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_altivec_ok } */
6 /* { dg-options "-maltivec" } */
8 #include <altivec.h>
10 vector signed short
11 test1 (vector bool short x, vector signed short y)
13 return vec_sub (x, y);
16 vector signed short
17 test2 (vector signed short x, vector bool short y)
19 return vec_sub (x, y);
22 vector signed short
23 test3 (vector signed short x, vector signed short y)
25 return vec_sub (x, y);
28 vector unsigned short
29 test4 (vector bool short x, vector unsigned short y)
31 return vec_sub (x, y);
34 vector unsigned short
35 test5 (vector unsigned short x, vector bool short y)
37 return vec_sub (x, y);
40 vector unsigned short
41 test6 (vector unsigned short x, vector unsigned short y)
43 return vec_sub (x, y);
46 /* { dg-final { scan-assembler-times "vsubuhm" 6 } } */