summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-12-08 20:28:33 +0000
committerManman Ren <manman.ren@gmail.com>2013-12-08 20:28:33 +0000
commit2e06c8c777a4fcfda2411222f12a7fd94ba443e1 (patch)
treebc43c66f398870e364b0dc45d86aed63f43887f9
parentabaed9ecea50318306207d437cf9b9fad06a6356 (diff)
downloadbcm5719-llvm-2e06c8c777a4fcfda2411222f12a7fd94ba443e1.tar.gz
bcm5719-llvm-2e06c8c777a4fcfda2411222f12a7fd94ba443e1.zip
Revert 196544 due to internal bot failures.
llvm-svn: 196732
-rw-r--r--llvm/lib/Target/TargetLibraryInfo.cpp25
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp6
-rw-r--r--llvm/test/Transforms/InstCombine/pow-1.ll24
3 files changed, 0 insertions, 55 deletions
diff --git a/llvm/lib/Target/TargetLibraryInfo.cpp b/llvm/lib/Target/TargetLibraryInfo.cpp
index 753562077f9..3e68fe16d4a 100644
--- a/llvm/lib/Target/TargetLibraryInfo.cpp
+++ b/llvm/lib/Target/TargetLibraryInfo.cpp
@@ -401,31 +401,6 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T,
TLI.setAvailableWithName(LibFunc::fputs, "fputs$UNIX2003");
}
- // exp10 and exp10f are not available on OS X until 10.9 and iOS until 7.0
- // and their names are __exp10 and __exp10f. exp10l is not available on
- // OS X or iOS.
- if (T.isMacOSX()) {
- TLI.setUnavailable(LibFunc::exp10l);
- if (T.isMacOSXVersionLT(10, 9)) {
- TLI.setUnavailable(LibFunc::exp10);
- TLI.setUnavailable(LibFunc::exp10f);
- } else {
- TLI.setAvailableWithName(LibFunc::exp10, "__exp10");
- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f");
- }
- }
-
- if (T.getOS() == Triple::IOS) {
- TLI.setUnavailable(LibFunc::exp10l);
- if (T.isOSVersionLT(7, 0)) {
- TLI.setUnavailable(LibFunc::exp10);
- TLI.setUnavailable(LibFunc::exp10f);
- } else {
- TLI.setAvailableWithName(LibFunc::exp10, "__exp10");
- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f");
- }
- }
-
// iprintf and friends are only available on XCore and TCE.
if (T.getArch() != Triple::xcore && T.getArch() != Triple::tce) {
TLI.setUnavailable(LibFunc::iprintf);
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index b555cf8bddb..15b3e66f94a 100644
--- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -1162,12 +1162,6 @@ struct PowOpt : public UnsafeFPLibCallOptimization {
hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp2, LibFunc::exp2f,
LibFunc::exp2l))
return EmitUnaryFloatFnCall(Op2, "exp2", B, Callee->getAttributes());
- // pow(10.0, x) -> exp10(x)
- if (Op1C->isExactlyValue(10.0) &&
- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp10, LibFunc::exp10f,
- LibFunc::exp10l))
- return EmitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp10), B,
- Callee->getAttributes());
}
ConstantFP *Op2C = dyn_cast<ConstantFP>(Op2);
diff --git a/llvm/test/Transforms/InstCombine/pow-1.ll b/llvm/test/Transforms/InstCombine/pow-1.ll
index 08dfa7a1013..9f1d073fe76 100644
--- a/llvm/test/Transforms/InstCombine/pow-1.ll
+++ b/llvm/test/Transforms/InstCombine/pow-1.ll
@@ -1,10 +1,6 @@
; Test that the pow library call simplifier works correctly.
;
; RUN: opt < %s -instcombine -S | FileCheck %s
-; RUN: opt -instcombine -S < %s -mtriple=x86_64-apple-macosx10.9 | FileCheck %s --check-prefix=CHECK-EXP10
-; RUN: opt -instcombine -S < %s -mtriple=arm-apple-ios7.0 | FileCheck %s --check-prefix=CHECK-EXP10
-; RUN: opt -instcombine -S < %s -mtriple=x86_64-apple-macosx10.8 | FileCheck %s --check-prefix=CHECK-NO-EXP10
-; RUN: opt -instcombine -S < %s -mtriple=arm-apple-ios6.0 | FileCheck %s --check-prefix=CHECK-NO-EXP10
; rdar://7251832
; NOTE: The readonly attribute on the pow call should be preserved
@@ -167,25 +163,5 @@ define double @test_simplify17(double %x) {
; CHECK-NEXT: ret double [[SELECT]]
}
-; Check pow(10.0, x) -> __exp10(x) on OS X 10.9+ and iOS 7.0+.
-
-define float @test_simplify18(float %x) {
-; CHECK-LABEL: @test_simplify18(
- %retval = call float @powf(float 10.0, float %x)
-; CHECK-EXP10: [[EXP10F:%[_a-z0-9]+]] = call float @__exp10f(float %x) [[NUW_RO:#[0-9]+]]
- ret float %retval
-; CHECK-EXP10: ret float [[EXP10F]]
-; CHECK-NO-EXP10: call float @powf
-}
-
-define double @test_simplify19(double %x) {
-; CHECK-LABEL: @test_simplify19(
- %retval = call double @pow(double 10.0, double %x)
-; CHECK-EXP10: [[EXP10:%[_a-z0-9]+]] = call double @__exp10(double %x) [[NUW_RO]]
- ret double %retval
-; CHECK-EXP10: ret double [[EXP10]]
-; CHECK-NO-EXP10: call double @pow
-}
-
; CHECK: attributes [[NUW_RO]] = { nounwind readonly }
OpenPOWER on IntegriCloud