diff options
author | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | c86b984ea8ecb3e944dc3de48539f4c1f65851ea (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /test/CodeGen/builtins.c | |
parent | c696171ff15f0ee60dea4abfd99a135473c95656 (diff) | |
download | FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.zip FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.tar.gz |
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'test/CodeGen/builtins.c')
-rw-r--r-- | test/CodeGen/builtins.c | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/test/CodeGen/builtins.c b/test/CodeGen/builtins.c index 39bd84c..1ab29a6 100644 --- a/test/CodeGen/builtins.c +++ b/test/CodeGen/builtins.c @@ -171,32 +171,55 @@ void bar() { void test_float_builtins(float F, double D, long double LD) { volatile int res; res = __builtin_isinf(F); - // CHECK: call float @fabsf(float + // CHECK: call float @llvm.fabs.f32(float // CHECK: fcmp oeq float {{.*}}, 0x7FF0000000000000 res = __builtin_isinf(D); - // CHECK: call double @fabs(double + // CHECK: call double @llvm.fabs.f64(double // CHECK: fcmp oeq double {{.*}}, 0x7FF0000000000000 res = __builtin_isinf(LD); - // CHECK: call x86_fp80 @fabsl(x86_fp80 + // CHECK: call x86_fp80 @llvm.fabs.f80(x86_fp80 // CHECK: fcmp oeq x86_fp80 {{.*}}, 0xK7FFF8000000000000000 res = __builtin_isfinite(F); // CHECK: fcmp oeq float - // CHECK: call float @fabsf + // CHECK: call float @llvm.fabs.f32(float // CHECK: fcmp une float {{.*}}, 0x7FF0000000000000 // CHECK: and i1 res = __builtin_isnormal(F); // CHECK: fcmp oeq float - // CHECK: call float @fabsf + // CHECK: call float @llvm.fabs.f32(float // CHECK: fcmp ult float {{.*}}, 0x7FF0000000000000 // CHECK: fcmp uge float {{.*}}, 0x3810000000000000 // CHECK: and i1 // CHECK: and i1 } +// CHECK-LABEL: define void @test_float_builtin_ops +void test_float_builtin_ops(float F, double D, long double LD) { + volatile float resf; + volatile double resd; + volatile long double resld; + + resf = __builtin_fmodf(F,F); + // CHECK: frem float + + resd = __builtin_fmod(D,D); + // CHECK: frem double + + resld = __builtin_fmodl(LD,LD); + // CHECK: frem x86_fp80 + + resf = __builtin_fabsf(F); + resd = __builtin_fabs(D); + resld = __builtin_fabsl(LD); + // CHECK: call float @llvm.fabs.f32(float + // CHECK: call double @llvm.fabs.f64(double + // CHECK: call x86_fp80 @llvm.fabs.f80(x86_fp80 +} + // CHECK-LABEL: define void @test_builtin_longjmp void test_builtin_longjmp(void **buffer) { // CHECK: [[BITCAST:%.*]] = bitcast |