Skip to content

Commit 100db53

Browse files
authored
[InstCombine][nfc] Remove dead invoke inst check in foldOpIntoPhi (#161871)
There's a check above the pred block is terminated with an unconditional branch, so this code is unreachable.
1 parent f597367 commit 100db53

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,12 +1970,6 @@ Instruction *InstCombinerImpl::foldOpIntoPhi(Instruction &I, PHINode *PN,
19701970
NewPhiValues.push_back(nullptr);
19711971
OpsToMoveUseToIncomingBB.push_back(i);
19721972

1973-
// If the InVal is an invoke at the end of the pred block, then we can't
1974-
// insert a computation after it without breaking the edge.
1975-
if (isa<InvokeInst>(InVal))
1976-
if (cast<Instruction>(InVal)->getParent() == InBB)
1977-
return nullptr;
1978-
19791973
// Do not push the operation across a loop backedge. This could result in
19801974
// an infinite combine loop, and is generally non-profitable (especially
19811975
// if the operation was originally outside the loop).

0 commit comments

Comments
 (0)