summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-06-20 19:04:44 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-06-20 19:04:44 +0000
commit802ebcb4bb739db8d4beec3c28dbb7f9fe4e77db (patch)
treed8230baddf9ca0276ef1e8b59a424ea2a516bb53 /llvm/lib/Transforms/InstCombine
parent524bcbf1f3ea3444defec17d05dd9449f2c03597 (diff)
downloadbcm5719-llvm-802ebcb4bb739db8d4beec3c28dbb7f9fe4e77db.tar.gz
bcm5719-llvm-802ebcb4bb739db8d4beec3c28dbb7f9fe4e77db.zip
InstCombine: Don't strip convergent from intrinsic callsites
Specific instances of intrinsic calls may want to be convergent, such as certain register reads but the intrinsic declaration is not. llvm-svn: 273188
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 1aa4b87bb92..c2cf21d5221 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -2507,7 +2507,8 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) {
if (Function *CalleeF = dyn_cast<Function>(Callee)) {
// Remove the convergent attr on calls when the callee is not convergent.
- if (CS.isConvergent() && !CalleeF->isConvergent()) {
+ if (CS.isConvergent() && !CalleeF->isConvergent() &&
+ !CalleeF->isIntrinsic()) {
DEBUG(dbgs() << "Removing convergent attr from instr "
<< CS.getInstruction() << "\n");
CS.setNotConvergent();
OpenPOWER on IntegriCloud