OSDN Git Service

* gcc.target/i386/pr34256.c: Update number of mov insns
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / sse5-pcmov.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 } */
5 /* { dg-require-effective-target lp64 } */
6 /* { dg-options "-O2 -msse5" } */
7
8 extern void exit (int);
9
10 double dbl_test (double a, double b, double c, double d)
11 {
12   return (a > b) ? c : d;
13 }
14
15 double dbl_a = 1, dbl_b = 2, dbl_c = 3, dbl_d = 4, dbl_e;
16
17 int main()
18 {
19   dbl_e = dbl_test (dbl_a, dbl_b, dbl_c, dbl_d);
20   exit (0);
21 }
22
23 /* { dg-final { scan-assembler "pcmov" } } */