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" } */
11 test1_min (vector
float x
, vector
float y
)
13 return vec_min (x
, y
);
17 test2_min (vector
double x
, vector
double y
)
19 return vec_min (x
, y
);
23 test1_max (vector
float x
, vector
float y
)
25 return vec_max (x
, y
);
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 } } */