summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-02-22 18:24:43 +0000
committerJustin Lebar <jlebar@google.com>2016-02-22 18:24:43 +0000
commitccbd8f5a020198b213ada6ead8839f59fb57d98f (patch)
tree091a06ced530f97aa2e8477ab6d3fdff8dd3f786 /llvm/lib/Transforms/InstCombine
parent6731d739eb77efb07f15c22bea6ec554bfdaaf66 (diff)
downloadbcm5719-llvm-ccbd8f5a020198b213ada6ead8839f59fb57d98f.tar.gz
bcm5719-llvm-ccbd8f5a020198b213ada6ead8839f59fb57d98f.zip
Revert "[attrs] Handle convergent CallSites."
This reverts r261544, which was causing a test failure in Transforms/FunctionAttrs/readattrs.ll. llvm-svn: 261549
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 71199a41ed3..249553aed27 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -2070,15 +2070,7 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) {
if (!isa<Function>(Callee) && transformConstExprCastCall(CS))
return nullptr;
- if (Function *CalleeF = dyn_cast<Function>(Callee)) {
- // Remove the convergent attr on calls when the callee is not convergent.
- if (CS.isConvergent() && !CalleeF->isConvergent()) {
- DEBUG(dbgs() << "Removing convergent attr from instr "
- << CS.getInstruction() << "\n");
- CS.setNotConvergent();
- return CS.getInstruction();
- }
-
+ if (Function *CalleeF = dyn_cast<Function>(Callee))
// If the call and callee calling conventions don't match, this call must
// be unreachable, as the call is undefined.
if (CalleeF->getCallingConv() != CS.getCallingConv() &&
@@ -2103,7 +2095,6 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) {
Constant::getNullValue(CalleeF->getType()));
return nullptr;
}
- }
if (isa<ConstantPointerNull>(Callee) || isa<UndefValue>(Callee)) {
// If CS does not return void then replaceAllUsesWith undef.
OpenPOWER on IntegriCloud