2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / sse5-pcmov2.c
blob6b174d66631bfa7fc27517c8a8cb164f0896769b
1 /* Test that the compiler properly optimizes conditional floating point moves
2 into the pcmov instruction on SSE5 systems. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target lp64 } */
6 /* { dg-options "-O2 -msse5" } */
8 extern void exit (int);
10 float flt_test (float a, float b, float c, float d)
12 return (a > b) ? c : d;
15 float flt_a = 1, flt_b = 2, flt_c = 3, flt_d = 4, flt_e;
17 int main()
19 flt_e = flt_test (flt_a, flt_b, flt_c, flt_d);
20 exit (0);
23 /* { dg-final { scan-assembler "pcmov" } } */