1 /* { dg-do compile } */
2 /* { dg-options "-O2 -msse2 -mfpmath=sse" } */
3 
4 float
foo(float a,float b,float c,float d)5 foo (float a, float b, float c, float d)
6 {
7   float ac, bd, ad, bc, y;
8 
9   ac = a * c;
10   bd = b * d;
11   ad = a * d;
12   bc = b * c;
13 
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);
20 
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);
28 
29   y = a * d + b * c;
30 
31   return y;
32 }
33