diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2014-09-03 15:24:29 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2014-09-03 15:24:29 +0000 |
commit | c4e0c1075b87e345f6dbb2d237be8b2ea1935d1b (patch) | |
tree | e8a9c6834dcb40b83cf7beb6561b6df480f4f17f /clang/test/CodeGen/builtins.c | |
parent | 102c68786c24b55fcfcaf53c62998af192151c52 (diff) | |
download | bcm5719-llvm-c4e0c1075b87e345f6dbb2d237be8b2ea1935d1b.tar.gz bcm5719-llvm-c4e0c1075b87e345f6dbb2d237be8b2ea1935d1b.zip |
CGBuiltin: Use @llvm.fabs rather than fabs libcall when emitting builtins
Using the intrinsic allows the SelectionDAGBuilder to turn this call
into the FABS Node and also the intrinsic is something the vectorizer knows
how to vectorize.
This patch also sets the readnone attribute on this call, which should
enable additional optmizations.
llvm-svn: 217042
Diffstat (limited to 'clang/test/CodeGen/builtins.c')
-rw-r--r-- | clang/test/CodeGen/builtins.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/CodeGen/builtins.c b/clang/test/CodeGen/builtins.c index 39bd84c5a5a..451ed07c738 100644 --- a/clang/test/CodeGen/builtins.c +++ b/clang/test/CodeGen/builtins.c @@ -171,26 +171,26 @@ 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 |