[LV] Remove some redundant casts (NFC).
This commit is contained in:
parent
df14dbd875
commit
baa77e30f0
@ -577,8 +577,7 @@ template <typename T> static T *getEnclosingLoopRegionForRegion(T *P) {
|
||||
P = P->getParent();
|
||||
// Multiple loop regions can be nested, but replicate regions can only be
|
||||
// nested inside a loop region or must be outside any other region.
|
||||
assert((!P || !cast<VPRegionBlock>(P)->isReplicator()) &&
|
||||
"unexpected nested replicate regions");
|
||||
assert((!P || !P->isReplicator()) && "unexpected nested replicate regions");
|
||||
}
|
||||
return P;
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ static bool mergeBlocksIntoPredecessors(VPlan &Plan) {
|
||||
for (VPRecipeBase &R : make_early_inc_range(*VPBB))
|
||||
R.moveBefore(*PredVPBB, PredVPBB->end());
|
||||
VPBlockUtils::disconnectBlocks(PredVPBB, VPBB);
|
||||
auto *ParentRegion = cast_or_null<VPRegionBlock>(VPBB->getParent());
|
||||
auto *ParentRegion = VPBB->getParent();
|
||||
if (ParentRegion && ParentRegion->getExiting() == VPBB)
|
||||
ParentRegion->setExiting(PredVPBB);
|
||||
for (auto *Succ : to_vector(VPBB->successors())) {
|
||||
@ -1240,9 +1240,9 @@ bool VPlanTransforms::adjustFixedOrderRecurrences(VPlan &Plan,
|
||||
LoopBuilder.setInsertPoint(InsertBlock,
|
||||
std::next(Previous->getIterator()));
|
||||
|
||||
auto *RecurSplice = cast<VPInstruction>(
|
||||
auto *RecurSplice =
|
||||
LoopBuilder.createNaryOp(VPInstruction::FirstOrderRecurrenceSplice,
|
||||
{FOR, FOR->getBackedgeValue()}));
|
||||
{FOR, FOR->getBackedgeValue()});
|
||||
|
||||
FOR->replaceAllUsesWith(RecurSplice);
|
||||
// Set the first operand of RecurSplice to FOR again, after replacing
|
||||
|
Loading…
x
Reference in New Issue
Block a user