[PATCH] D127810: [InstCombine] Improve check for catchswitch BBs (NFC)
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 16:44:14 PDT 2022
aheejin created this revision.
aheejin added a reviewer: nikic.
Herald added subscribers: wingo, hiraditya.
Herald added a project: All.
aheejin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D127810
Files:
llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
Index: llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
===================================================================
--- llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
+++ llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
@@ -1125,7 +1125,7 @@
// extract the value within that BB because we cannot insert any non-PHI
// instructions in the BB.
for (auto *Pred : PN->blocks())
- if (isa<CatchSwitchInst>(Pred->getFirstNonPHI()))
+ if (Pred->getFirstInsertionPt() == Pred->end())
return nullptr;
for (User *U : PN->users()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127810.436975.patch
Type: text/x-patch
Size: 579 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220614/83177736/attachment.bin>
More information about the llvm-commits
mailing list