PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr68991.c
blob3fc5ac8dceb266d943e0d7d5aacbdac8fd109527
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -msse2 -mfpmath=sse" } */
4 float
5 foo (float a, float b, float c, float d)
7 float ac, bd, ad, bc, y;
9 ac = a * c;
10 bd = b * d;
11 ad = a * d;
12 bc = b * c;
14 if (__builtin_expect (!__builtin_expect ((a) != (a), 0)
15 & !__builtin_expect (!__builtin_expect (((a) - (a)) != ((a) - (a)), 0), 1), 0)
16 || __builtin_expect (!__builtin_expect ((b) != (b), 0)
17 & !__builtin_expect (!__builtin_expect (((b) - (b)) != ((b) - (b)), 0), 1), 0))
18 a = __builtin_copysignf (__builtin_expect (!__builtin_expect ((a) != (a), 0)
19 & !__builtin_expect (!__builtin_expect (((a) - (a)) != ((a) - (a)), 0), 1), 0) ? 1 : 0, a);
21 c = __builtin_copysignf (__builtin_expect (!__builtin_expect ((c) != (c), 0) & !__builtin_expect (!__builtin_expect (((c) - (c)) != ((c) - (c)), 0), 1), 0) ? 1 : 0, c);
22 if ((__builtin_expect (!__builtin_expect ((ac) != (ac), 0)
23 & !__builtin_expect (!__builtin_expect (((ac) - (ac)) != ((ac) - (ac)), 0), 1), 0)
24 || __builtin_expect (!__builtin_expect ((bd) != (bd), 0)
25 & !__builtin_expect (!__builtin_expect (((bd) - (bd)) != ((bd) - (bd)), 0), 1), 0)
26 || __builtin_expect (!__builtin_expect ((bc) != (bc), 0) & !__builtin_expect (!__builtin_expect (((bc) - (bc)) != ((bc) - (bc)), 0), 1), 0)))
27 d = __builtin_copysignf (0, d);
29 y = a * d + b * c;
31 return y;