OSDN Git Service

Add AMD SSE5 support; Add iterator over function arguments; Add stdarg_p, prototype_p...
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / sse5-pcmov2.c
1 /* Test that the compiler properly optimizes conditional floating point moves
2    into the pcmov instruction on SSE5 systems.  */
3
4 /* { dg-do compile { target x86_64-*-*} } */
5 /* { dg-options "-O2 -msse5" } */
6
7 extern void exit (int);
8
9 float flt_test (float a, float b, float c, float d)
10 {
11   return (a > b) ? c : d;
12 }
13
14 float flt_a = 1, flt_b = 2, flt_c = 3, flt_d = 4, flt_e;
15
16 int main()
17 {
18   flt_e = flt_test (flt_a, flt_b, flt_c, flt_d);
19   exit (0);
20 }
21
22 /* { dg-final { scan-assembler "pcmov" } } */