aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUnroll.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2021-07-19 15:31:10 -0500
committerJohannes Doerfert <johannes@jdoerfert.de>2021-07-26 23:33:36 -0500
commit25a3130d89f00f53a23f7fc38250d5dc43e29cfb (patch)
treea1e197a774693c1f994d93ff890a45a5e987e598 /llvm/lib/Transforms/Utils/LoopUnroll.cpp
parent41bd26dff9869a0d72f95ed750a82136f1bccc81 (diff)
downloadllvm-25a3130d89f00f53a23f7fc38250d5dc43e29cfb.zip
llvm-25a3130d89f00f53a23f7fc38250d5dc43e29cfb.tar.gz
llvm-25a3130d89f00f53a23f7fc38250d5dc43e29cfb.tar.bz2
[Local] Do not introduce a new `llvm.trap` before `unreachable`
This is the second attempt to remove the `llvm.trap` insertion after https://reviews.llvm.org/rGe14e7bc4b889dfaffb7180d176a03311df2d4ae6 reverted the first one. It is not clear what the exact issue was back then and it might already be gone by now, it has been >5 years after all. Replaces D106299. Differential Revision: https://reviews.llvm.org/D106308
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnroll.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUnroll.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnroll.cpp b/llvm/lib/Transforms/Utils/LoopUnroll.cpp
index 78b3c77..a91bf7b 100644
--- a/llvm/lib/Transforms/Utils/LoopUnroll.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnroll.cpp
@@ -739,8 +739,7 @@ LoopUnrollResult llvm::UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI,
// When completely unrolling, the last latch becomes unreachable.
if (!LatchIsExiting && CompletelyUnroll)
- changeToUnreachable(Latches.back()->getTerminator(), /* UseTrap */ false,
- PreserveLCSSA, &DTU);
+ changeToUnreachable(Latches.back()->getTerminator(), PreserveLCSSA, &DTU);
// Merge adjacent basic blocks, if possible.
for (BasicBlock *Latch : Latches) {