[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-minmax-char.c
blob6c412a4ed25490db85187e53b1eb67adadc062ae
1 /* Verify that overloaded built-ins for vec_min with char
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 char
11 test3_min (vector signed char x, vector signed char y)
13 return vec_min (x, y);
16 vector unsigned char
17 test6_min (vector unsigned char x, vector unsigned char y)
19 return vec_min (x, y);
22 vector signed char
23 test1_min (vector bool char x, vector signed char y)
25 return vec_min (x, y);
28 vector unsigned char
29 test2_min (vector bool char x, vector unsigned char y)
31 return vec_min (x, y);
34 vector unsigned char
35 test4_min (vector unsigned char x, vector bool char y)
37 return vec_min (x, y);
40 vector signed char
41 test1_max (vector signed char x, vector signed char y)
43 return vec_max (x, y);
46 vector unsigned char
47 test2_max (vector unsigned char x, vector unsigned char y)
49 return vec_max (x, y);
52 /* { dg-final { scan-assembler-times "vminsb" 2 } } */
53 /* { dg-final { scan-assembler-times "vmaxsb" 1 } } */
54 /* { dg-final { scan-assembler-times "vminub" 3 } } */
55 /* { dg-final { scan-assembler-times "vmaxub" 1 } } */