summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Analysis
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2017-12-16 01:26:25 +0000
committerHal Finkel <hfinkel@anl.gov>2017-12-16 01:26:25 +0000
commit2ff24731bbf905faab6580de7c3e68092ca1ae17 (patch)
treeb94925a2ab5323a87d297d7e72537838e45fe366 /llvm/unittests/Analysis
parent7333aa9f16013bf12e9b1947f636d8a4b4586ef0 (diff)
downloadbcm5719-llvm-2ff24731bbf905faab6580de7c3e68092ca1ae17.tar.gz
bcm5719-llvm-2ff24731bbf905faab6580de7c3e68092ca1ae17.zip
[SimplifyLibCalls] Inline calls to cabs when it's safe to do so
When unsafe algerbra is allowed calls to cabs(r) can be replaced by: sqrt(creal(r)*creal(r) + cimag(r)*cimag(r)) Patch by Paul Walker, thanks! Differential Revision: https://reviews.llvm.org/D40069 llvm-svn: 320901
Diffstat (limited to 'llvm/unittests/Analysis')
-rw-r--r--llvm/unittests/Analysis/TargetLibraryInfoTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
index 9d852cf0301..ef558a434c7 100644
--- a/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
+++ b/llvm/unittests/Analysis/TargetLibraryInfoTest.cpp
@@ -131,6 +131,9 @@ TEST_F(TargetLibraryInfoTest, ValidProto) {
"declare double @copysign(double, double)\n"
"declare float @copysignf(float, float)\n"
"declare x86_fp80 @copysignl(x86_fp80, x86_fp80)\n"
+ "declare double @cabs([2 x double])\n"
+ "declare float @cabsf([2 x float])\n"
+ "declare x86_fp80 @cabsl([2 x x86_fp80])\n"
"declare double @cos(double)\n"
"declare float @cosf(float)\n"
"declare double @cosh(double)\n"
OpenPOWER on IntegriCloud