[llvm] b2f4112 - [InstCombine] Improve check for catchswitch BBs (NFC)
Heejin Ahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 01:06:20 PDT 2022
Author: Heejin Ahn
Date: 2022-06-15T01:06:13-07:00
New Revision: b2f4112f256756074b5a5f0a1f9be1222f4dc8de
URL: https://github.com/llvm/llvm-project/commit/b2f4112f256756074b5a5f0a1f9be1222f4dc8de
DIFF: https://github.com/llvm/llvm-project/commit/b2f4112f256756074b5a5f0a1f9be1222f4dc8de.diff
LOG: [InstCombine] Improve check for catchswitch BBs (NFC)
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D127810
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp b/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
index 83f7846bbfce5..90a796a0939ef 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
@@ -1125,7 +1125,7 @@ Instruction *InstCombinerImpl::SliceUpIllegalIntegerPHI(PHINode &FirstPhi) {
// 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()) {
More information about the llvm-commits
mailing list