diff options
author | Yevgeny Rouban <yrouban@azul.com> | 2020-12-18 12:47:13 +0700 |
---|---|---|
committer | Yevgeny Rouban <yrouban@azul.com> | 2020-12-18 12:52:23 +0700 |
commit | f0e3d1d6ca8c9c0d1191de1db90bd4906d16cb28 (patch) | |
tree | c7b3481eb00b4d0671a7b3601f31e54c92206b5b /llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | |
parent | d3bf0bb18952d830fe6df6f791a64552b271000b (diff) | |
download | llvm-f0e3d1d6ca8c9c0d1191de1db90bd4906d16cb28.zip llvm-f0e3d1d6ca8c9c0d1191de1db90bd4906d16cb28.tar.gz llvm-f0e3d1d6ca8c9c0d1191de1db90bd4906d16cb28.tar.bz2 |
[IndVars] Fix adding trunc instructions to unwind blocks
Truncate instruction must not be inserted before landing pads.
The insertion point is fixed.
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyIndVar.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyIndVar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp index 189130f..f3b1980 100644 --- a/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp @@ -1654,7 +1654,7 @@ bool WidenIV::widenWithVariantUse(WidenIV::NarrowIVDefUse DU) { assert(LoopExitingBlock && L->contains(LoopExitingBlock) && "Not a LCSSA Phi?"); WidePN->addIncoming(WideBO, LoopExitingBlock); - Builder.SetInsertPoint(User->getParent()->getFirstNonPHI()); + Builder.SetInsertPoint(&*User->getParent()->getFirstInsertionPt()); auto *TruncPN = Builder.CreateTrunc(WidePN, User->getType()); User->replaceAllUsesWith(TruncPN); DeadInsts.emplace_back(User); |