1 /* { dg-do run } */ 2 /* { dg-options "-O3 -fdump-tree-ssa" } */ 3 /* { dg-require-effective-target fenv_exceptions } */ 4 5 #include <fenv.h> 6 7 double x[28], y[28]; 8 int res[28]; 9 10 int main(void)11main (void) 12 { 13 int i; 14 for (i = 0; i < 28; ++i) 15 { 16 x[i] = __builtin_nan (""); 17 y[i] = i; 18 } 19 __asm__ volatile ("" ::: "memory"); 20 feclearexcept (FE_ALL_EXCEPT); 21 for (i = 0; i < 4; ++i) 22 res[i] = __builtin_isgreater (x[i], y[i]); 23 for (i = 4; i < 8; ++i) 24 res[i] = __builtin_isgreaterequal (x[i], y[i]); 25 for (i = 8; i < 12; ++i) 26 res[i] = __builtin_isless (x[i], y[i]); 27 for (i = 12; i < 16; ++i) 28 res[i] = __builtin_islessequal (x[i], y[i]); 29 for (i = 16; i < 20; ++i) 30 res[i] = __builtin_islessgreater (x[i], y[i]); 31 for (i = 20; i < 24; ++i) 32 res[i] = __builtin_isunordered (x[i], y[i]); 33 for (i = 24; i < 28; ++i) 34 res[i] = !(__builtin_isunordered (x[i], y[i])); 35 __asm__ volatile ("" ::: "memory"); 36 return fetestexcept (FE_ALL_EXCEPT) != 0; 37 } 38 39 /* { dg-final { scan-tree-dump " u> " "ssa" } } */ 40 /* { dg-final { scan-tree-dump " u>= " "ssa" } } */ 41 /* { dg-final { scan-tree-dump " u< " "ssa" } } */ 42 /* { dg-final { scan-tree-dump " u<= " "ssa" } } */ 43 /* { dg-final { scan-tree-dump " u== " "ssa" } } */ 44 /* { dg-final { scan-tree-dump " unord " "ssa" } } */ 45 /* { dg-final { scan-tree-dump " ord " "ssa" } } */ 46