forked from OSchip/llvm-project
[SimplifyCFG] Remove redundant checks for hoisting (NFCI)
These conditions are later checked in the HoistTerminator code path. Checking them here is somewhat confusing, because this code only checks the first instruction in the block, which is not necessarily the terminator.
This commit is contained in:
parent
7fbf55c927
commit
9604601c93
|
@ -1473,10 +1473,7 @@ bool SimplifyCFGOpt::HoistThenElseCodeToIf(BranchInst *BI,
|
|||
while (isa<DbgInfoIntrinsic>(I2))
|
||||
I2 = &*BB2_Itr++;
|
||||
}
|
||||
// FIXME: Can we define a safety predicate for CallBr?
|
||||
if (isa<PHINode>(I1) || !I1->isIdenticalToWhenDefined(I2) ||
|
||||
(isa<InvokeInst>(I1) && !isSafeToHoistInvoke(BB1, BB2, I1, I2)) ||
|
||||
isa<CallBrInst>(I1))
|
||||
if (isa<PHINode>(I1) || !I1->isIdenticalToWhenDefined(I2))
|
||||
return false;
|
||||
|
||||
BasicBlock *BIParent = BI->getParent();
|
||||
|
|
Loading…
Reference in New Issue