@@ -1072,10 +1072,11 @@ void VPlanTransforms::truncateToMinimalBitwidths(
1072
1072
ResultVPV->replaceAllUsesWith (Ext);
1073
1073
Ext->setOperand (0 , ResultVPV);
1074
1074
assert (OldResSizeInBits > NewResSizeInBits && " Nothing to shrink?" );
1075
- } else
1075
+ } else {
1076
1076
assert (
1077
1077
match (&R, m_Binary<Instruction::ICmp>(m_VPValue (), m_VPValue ())) &&
1078
1078
" Only ICmps should not need extending the result." );
1079
+ }
1079
1080
1080
1081
assert (!isa<VPWidenStoreRecipe>(&R) && " stores cannot be narrowed" );
1081
1082
if (isa<VPWidenLoadRecipe>(&R))
@@ -1214,7 +1215,7 @@ static VPActiveLaneMaskPHIRecipe *addVPLaneMaskPhiAndUpdateExitBranch(
1214
1215
1215
1216
// Now create the ActiveLaneMaskPhi recipe in the main loop using the
1216
1217
// preheader ActiveLaneMask instruction.
1217
- auto LaneMaskPhi = new VPActiveLaneMaskPHIRecipe (EntryALM, DebugLoc ());
1218
+ auto * LaneMaskPhi = new VPActiveLaneMaskPHIRecipe (EntryALM, DebugLoc ());
1218
1219
LaneMaskPhi->insertAfter (CanonicalIVPHI);
1219
1220
1220
1221
// Create the active lane mask for the next iteration of the loop before the
@@ -1290,7 +1291,7 @@ void VPlanTransforms::addActiveLaneMask(
1290
1291
" DataAndControlFlowWithoutRuntimeCheck implies "
1291
1292
" UseActiveLaneMaskForControlFlow" );
1292
1293
1293
- auto FoundWidenCanonicalIVUser =
1294
+ auto * FoundWidenCanonicalIVUser =
1294
1295
find_if (Plan.getCanonicalIV ()->users (),
1295
1296
[](VPUser *U) { return isa<VPWidenCanonicalIVRecipe>(U); });
1296
1297
assert (FoundWidenCanonicalIVUser &&
@@ -1440,14 +1441,13 @@ void VPlanTransforms::dropPoisonGeneratingRecipes(
1440
1441
// Collect recipes in the backward slice of `Root` that may generate a poison
1441
1442
// value that is used after vectorization.
1442
1443
SmallPtrSet<VPRecipeBase *, 16 > Visited;
1443
- auto collectPoisonGeneratingInstrsInBackwardSlice ([&](VPRecipeBase *Root) {
1444
+ auto CollectPoisonGeneratingInstrsInBackwardSlice ([&](VPRecipeBase *Root) {
1444
1445
SmallVector<VPRecipeBase *, 16 > Worklist;
1445
1446
Worklist.push_back (Root);
1446
1447
1447
1448
// Traverse the backward slice of Root through its use-def chain.
1448
1449
while (!Worklist.empty ()) {
1449
- VPRecipeBase *CurRec = Worklist.back ();
1450
- Worklist.pop_back ();
1450
+ VPRecipeBase *CurRec = Worklist.pop_back_val ();
1451
1451
1452
1452
if (!Visited.insert (CurRec).second )
1453
1453
continue ;
@@ -1493,8 +1493,8 @@ void VPlanTransforms::dropPoisonGeneratingRecipes(
1493
1493
}
1494
1494
1495
1495
// Add new definitions to the worklist.
1496
- for (VPValue *operand : CurRec->operands ())
1497
- if (VPRecipeBase *OpDef = operand ->getDefiningRecipe ())
1496
+ for (VPValue *Operand : CurRec->operands ())
1497
+ if (VPRecipeBase *OpDef = Operand ->getDefiningRecipe ())
1498
1498
Worklist.push_back (OpDef);
1499
1499
}
1500
1500
});
@@ -1510,7 +1510,7 @@ void VPlanTransforms::dropPoisonGeneratingRecipes(
1510
1510
VPRecipeBase *AddrDef = WidenRec->getAddr ()->getDefiningRecipe ();
1511
1511
if (AddrDef && WidenRec->isConsecutive () &&
1512
1512
BlockNeedsPredication (UnderlyingInstr.getParent ()))
1513
- collectPoisonGeneratingInstrsInBackwardSlice (AddrDef);
1513
+ CollectPoisonGeneratingInstrsInBackwardSlice (AddrDef);
1514
1514
} else if (auto *InterleaveRec = dyn_cast<VPInterleaveRecipe>(&Recipe)) {
1515
1515
VPRecipeBase *AddrDef = InterleaveRec->getAddr ()->getDefiningRecipe ();
1516
1516
if (AddrDef) {
@@ -1526,7 +1526,7 @@ void VPlanTransforms::dropPoisonGeneratingRecipes(
1526
1526
}
1527
1527
1528
1528
if (NeedPredication)
1529
- collectPoisonGeneratingInstrsInBackwardSlice (AddrDef);
1529
+ CollectPoisonGeneratingInstrsInBackwardSlice (AddrDef);
1530
1530
}
1531
1531
}
1532
1532
}
0 commit comments