Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-minmax-floatdouble.c
blob1185ce28f45249f8ab4856f7209e0a36d037f759
1 /* Verify that overloaded built-ins for vec_max with float and
2 double inputs for VSX produce the right results. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_vsx_ok } */
6 /* { dg-options "-mvsx -O2" } */
8 #include <altivec.h>
10 vector float
11 test1_min (vector float x, vector float y)
13 return vec_min (x, y);
16 vector double
17 test2_min (vector double x, vector double y)
19 return vec_min (x, y);
22 vector float
23 test1_max (vector float x, vector float y)
25 return vec_max (x, y);
28 vector double
29 test2_max (vector double x, vector double y)
31 return vec_max (x, y);
34 /* { dg-final { scan-assembler-times "vminsp" 1 } } */
35 /* { dg-final { scan-assembler-times "vmindp" 1 } } */
36 /* { dg-final { scan-assembler-times "vmaxsp" 1 } } */
37 /* { dg-final { scan-assembler-times "vmaxdp" 1 } } */