Skip to content

Commit cfc3473

Browse files
committed
[InstCombine][nfc] Remove dead invoke inst check in foldOpIntoPhi
There's a check above the pred block is terminated with an unconditional branch, so this code is unreachable.
1 parent cff5a43 commit cfc3473

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
@@ -1968,12 +1968,6 @@ Instruction *InstCombinerImpl::foldOpIntoPhi(Instruction &I, PHINode *PN,
19681968
NewPhiValues.push_back(nullptr);
19691969
OpsToMoveUseToIncomingBB.push_back(i);
19701970

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

0 commit comments

Comments
 (0)