xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2004-06-17-UnorderedBuiltins.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s  -o /dev/null
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc _Bool A, B, C, D, E, F, G, H;
TestF(float X,float Y)5*f4a2713aSLionel Sambuc void TestF(float X, float Y) {
6*f4a2713aSLionel Sambuc   A = __builtin_isgreater(X, Y);
7*f4a2713aSLionel Sambuc   B = __builtin_isgreaterequal(X, Y);
8*f4a2713aSLionel Sambuc   C = __builtin_isless(X, Y);
9*f4a2713aSLionel Sambuc   D = __builtin_islessequal(X, Y);
10*f4a2713aSLionel Sambuc   E = __builtin_islessgreater(X, Y);
11*f4a2713aSLionel Sambuc   F = __builtin_isunordered(X, Y);
12*f4a2713aSLionel Sambuc   //G = __builtin_isordered(X, Y);    // Our current snapshot of GCC doesn't include this builtin
13*f4a2713aSLionel Sambuc   H = __builtin_isunordered(X, Y);
14*f4a2713aSLionel Sambuc }
TestD(double X,double Y)15*f4a2713aSLionel Sambuc void TestD(double X, double Y) {
16*f4a2713aSLionel Sambuc   A = __builtin_isgreater(X, Y);
17*f4a2713aSLionel Sambuc   B = __builtin_isgreaterequal(X, Y);
18*f4a2713aSLionel Sambuc   C = __builtin_isless(X, Y);
19*f4a2713aSLionel Sambuc   D = __builtin_islessequal(X, Y);
20*f4a2713aSLionel Sambuc   E = __builtin_islessgreater(X, Y);
21*f4a2713aSLionel Sambuc   F = __builtin_isunordered(X, Y);
22*f4a2713aSLionel Sambuc   //G = __builtin_isordered(X, Y);    // Our current snapshot doesn't include this builtin.  FIXME
23*f4a2713aSLionel Sambuc   H = __builtin_isunordered(X, Y);
24*f4a2713aSLionel Sambuc }
25