summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 7e09ec74bef..7109ff84b8e 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -3478,7 +3478,8 @@ bool llvm::isGuaranteedToTransferExecutionToSuccessor(const Instruction *I) {
// but it's consistent with other passes. See http://llvm.org/PR965 .
// FIXME: This isn't aggressive enough; a call which only writes to a
// global is guaranteed to return.
- return CS.onlyReadsMemory() || CS.onlyAccessesArgMemory();
+ return CS.onlyReadsMemory() || CS.onlyAccessesArgMemory() ||
+ match(I, m_Intrinsic<Intrinsic::assume>());
}
// Other instructions return normally.
OpenPOWER on IntegriCloud