summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-02-19 00:52:45 +0000
committerBill Wendling <isanbard@gmail.com>2013-02-19 00:52:45 +0000
commitc98e4fef1af2dd9155b49e98cac98d528e7e1b35 (patch)
treec8dae183e3c5cf7f0475a4dafad8e36a47a29a46
parenta5da2adc7707c22ca216eea5480feccbc6769007 (diff)
downloadbcm5719-llvm-c98e4fef1af2dd9155b49e98cac98d528e7e1b35.tar.gz
bcm5719-llvm-c98e4fef1af2dd9155b49e98cac98d528e7e1b35.zip
Temporarily revert r175470 for more review.
llvm-svn: 175476
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp3
-rw-r--r--llvm/test/Transforms/InstCombine/no-builtin.ll23
2 files changed, 0 insertions, 26 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index 2f47174ea6c..cccf0a67a64 100644
--- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -1889,9 +1889,6 @@ LibCallSimplifier::~LibCallSimplifier() {
}
Value *LibCallSimplifier::optimizeCall(CallInst *CI) {
- Function *F = CI->getParent()->getParent();
- // We don't want to "optimize" if the function doesn't want builtins.
- if (F->hasFnAttribute("no-builtin")) return 0;
return Impl->optimizeCall(CI);
}
diff --git a/llvm/test/Transforms/InstCombine/no-builtin.ll b/llvm/test/Transforms/InstCombine/no-builtin.ll
deleted file mode 100644
index a576cd4813d..00000000000
--- a/llvm/test/Transforms/InstCombine/no-builtin.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; RUN: opt < %s -instcombine -S | FileCheck %s
-@.str = private unnamed_addr constant [14 x i8] c"hello world!\0A\00", align 1
-
-; CHECK: @foo
-; CHECK: printf
-define void @foo() nounwind ssp uwtable "no-builtin" {
-entry:
- %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0))
- ret void
-}
-
-; CHECK: @bar
-; CHECK: puts
-define void @bar() nounwind ssp uwtable {
-entry:
- %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([14 x i8]* @.str, i32 0, i32 0))
- ret void
-}
-
-declare i32 @printf(i8*, ...)
-
-attributes #0 = { nounwind ssp uwtable "no-builtin" }
-attributes #1 = { nounwind ssp uwtable }
OpenPOWER on IntegriCloud