diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-27 15:17:06 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-27 15:17:06 +0000 |
| commit | d7279c4c177bca357ef96ff1379fd9bc420bfe83 (patch) | |
| tree | 3558f327a6f9ab59c5d7a06528d84e1560445247 /test/CodeGen/builtins.c | |
| parent | be17651f5cd2e94922c1b732bc8589e180698193 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/builtins.c')
| -rw-r--r-- | test/CodeGen/builtins.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/CodeGen/builtins.c b/test/CodeGen/builtins.c index a4424d77428f..8b6125806eff 100644 --- a/test/CodeGen/builtins.c +++ b/test/CodeGen/builtins.c @@ -163,3 +163,35 @@ void bar() { } // CHECK: } + + +// CHECK: define void @test_float_builtins +void test_float_builtins(float F, double D, long double LD) { + volatile int res; + res = __builtin_isinf(F); + // CHECK: call float @fabsf(float + // CHECK: fcmp oeq float {{.*}}, 0x7FF0000000000000 + + res = __builtin_isinf(D); + // CHECK: call double @fabs(double + // CHECK: fcmp oeq double {{.*}}, 0x7FF0000000000000 + + res = __builtin_isinf(LD); + // CHECK: call x86_fp80 @fabsl(x86_fp80 + // CHECK: fcmp oeq x86_fp80 {{.*}}, 0xK7FFF8000000000000000 + + res = __builtin_isfinite(F); + // CHECK: fcmp oeq float + // CHECK: call float @fabsf + // CHECK: fcmp une float {{.*}}, 0x7FF0000000000000 + // CHECK: and i1 + + res = __builtin_isnormal(F); + // CHECK: fcmp oeq float + // CHECK: call float @fabsf + // CHECK: fcmp ult float {{.*}}, 0x7FF0000000000000 + // CHECK: fcmp uge float {{.*}}, 0x3810000000000000 + // CHECK: and i1 + // CHECK: and i1 +} + |
