@@ -1243,8 +1243,8 @@ class LoopVectorizationCostModel {
1243
1243
return false;
1244
1244
1245
1245
// Get the source and destination types of the truncate.
1246
- Type *SrcTy = toVectorTy (cast<CastInst>(I) ->getSrcTy (), VF);
1247
- Type *DestTy = toVectorTy (cast<CastInst>(I) ->getDestTy (), VF);
1246
+ Type *SrcTy = toVectorTy(Trunc ->getSrcTy(), VF);
1247
+ Type *DestTy = toVectorTy(Trunc ->getDestTy(), VF);
1248
1248
1249
1249
// If the truncate is free for the given types, return false. Replacing a
1250
1250
// free truncate with an induction variable would add an induction variable
@@ -5132,7 +5132,7 @@ LoopVectorizationCostModel::selectInterleaveCount(ElementCount VF,
5132
5132
return 1;
5133
5133
}
5134
5134
5135
- unsigned F = static_cast < unsigned >( MaxNestedScalarReductionIC) ;
5135
+ unsigned F = MaxNestedScalarReductionIC;
5136
5136
SmallIC = std::min(SmallIC, F);
5137
5137
StoresIC = std::min(StoresIC, F);
5138
5138
LoadsIC = std::min(LoadsIC, F);
@@ -10303,8 +10303,7 @@ static void preparePlanForMainVectorLoop(VPlan &MainPlan, VPlan &EpiPlan) {
10303
10303
EpiWidenedPhis.insert(
10304
10304
cast<PHINode>(R.getVPSingleValue()->getUnderlyingValue()));
10305
10305
}
10306
- for (VPRecipeBase &R : make_early_inc_range (
10307
- *cast<VPIRBasicBlock>(MainPlan.getScalarHeader ()))) {
10306
+ for (VPRecipeBase &R : make_early_inc_range(*MainPlan.getScalarHeader())) {
10308
10307
auto *VPIRInst = cast<VPIRInstruction>(&R);
10309
10308
auto *IRI = dyn_cast<PHINode>(&VPIRInst->getInstruction());
10310
10309
if (!IRI)
0 commit comments