aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-06-12 14:03:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-06-12 14:03:02 +0000
commit9374e9ebbc9b95cbd8217d2a14a4584d9a876978 (patch)
tree9765abc11c0252994c226c538c3a2df010f28f1a /llvm/lib/Transforms/Utils/Local.cpp
parent947eb1449054880e65af3acb5a5c77c590aba9ce (diff)
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Local.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 9a10535c9310..1c350a2585d0 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -2350,7 +2350,7 @@ static bool markAliveBlocks(Function &F,
changeToUnreachable(II, false, DTU);
Changed = true;
} else if (II->doesNotThrow() && canSimplifyInvokeNoUnwind(&F)) {
- if (II->use_empty() && II->onlyReadsMemory()) {
+ if (II->use_empty() && !II->mayHaveSideEffects()) {
// jump to the normal destination branch.
BasicBlock *NormalDestBB = II->getNormalDest();
BasicBlock *UnwindDestBB = II->getUnwindDest();