Skip to content

Commit 969f641

Browse files
authored
[VPlan] Replace VPTypeAnalysis with VPValue::getScalarType. (NFC) (#200256)
Now that all VPValues have their scalar type set at construction, replace calls to VPTypeAnalysis::inferScalarType with direct calls to VPValue::getScalarType, and remove the no-longer-needed VPTypeAnalysis members from VPCostContext and VPTransformState. Also remove the getScalarTypeOrInfer fallback helper. Depends on #200255 PR: #200256
1 parent bbc8fcb commit 969f641

14 files changed

Lines changed: 307 additions & 467 deletions

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3262,7 +3262,6 @@ void LoopVectorizationPlanner::emitInvalidCostRemarks(
32623262
static bool willGenerateVectors(VPlan &Plan, ElementCount VF,
32633263
const TargetTransformInfo &TTI) {
32643264
assert(VF.isVector() && "Checking a scalar VF?");
3265-
VPTypeAnalysis TypeInfo(Plan);
32663265
DenseSet<VPRecipeBase *> EphemeralRecipes;
32673266
collectEphemeralRecipesForVPlan(Plan, EphemeralRecipes);
32683267
// Set of already visited types.
@@ -3342,7 +3341,7 @@ static bool willGenerateVectors(VPlan &Plan, ElementCount VF,
33423341
// operand.
33433342
VPValue *ToCheck =
33443343
R.getNumDefinedValues() >= 1 ? R.getVPValue(0) : R.getOperand(1);
3345-
Type *ScalarTy = TypeInfo.inferScalarType(ToCheck);
3344+
Type *ScalarTy = ToCheck->getScalarType();
33463345
if (!Visited.insert({ScalarTy}).second)
33473346
continue;
33483347
Type *WideTy = toVectorizedTy(ScalarTy, VF);
@@ -6029,8 +6028,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
60296028

60306029
// Perform the actual loop transformation.
60316030
VPTransformState State(&TTI, BestVF, LI, DT, ILV.AC, ILV.Builder, &BestVPlan,
6032-
OrigLoop->getParentLoop(),
6033-
Legal->getWidestInductionType());
6031+
OrigLoop->getParentLoop());
60346032

60356033
#ifdef EXPENSIVE_CHECKS
60366034
assert(DT->verify(DominatorTree::VerificationLevel::Fast));
@@ -6843,8 +6841,6 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlan(VPlanPtr Plan,
68436841
// TODO: Enable following transform when the EVL-version of extended-reduction
68446842
// and mulacc-reduction are implemented.
68456843
if (!CM.foldTailWithEVL()) {
6846-
VPCostContext CostCtx(CM.TTI, *CM.TLI, *Plan, CM, Config.CostKind, CM.PSE,
6847-
OrigLoop);
68486844
RUN_VPLAN_PASS(VPlanTransforms::createPartialReductions, *Plan, CostCtx,
68496845
Range);
68506846
RUN_VPLAN_PASS(VPlanTransforms::convertToAbstractRecipes, *Plan, CostCtx,
@@ -6858,15 +6854,9 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlan(VPlanPtr Plan,
68586854
InterleaveGroups, CM.isEpilogueAllowed());
68596855

68606856
// Convert memory recipes to strided access recipes if the strided access is
6861-
// legal and profitable. Use a new VPCostContext to ensure type inference
6862-
// reflects the current plan state.
6863-
// TODO: Remove this VPCostContext scope once VPTypeAnalysis is removed.
6864-
{
6865-
VPCostContext CostCtx(CM.TTI, *CM.TLI, *Plan, CM, Config.CostKind, CM.PSE,
6866-
OrigLoop);
6867-
RUN_VPLAN_PASS(VPlanTransforms::convertToStridedAccesses, *Plan, PSE,
6868-
*OrigLoop, CostCtx, Range);
6869-
}
6857+
// legal and profitable.
6858+
RUN_VPLAN_PASS(VPlanTransforms::convertToStridedAccesses, *Plan, PSE,
6859+
*OrigLoop, CostCtx, Range);
68706860

68716861
// Ensure scalar VF plans only contain VF=1, as required by hasScalarVFOnly.
68726862
if (Range.Start.isScalar())
@@ -6895,7 +6885,6 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlan(VPlanPtr Plan,
68956885
void LoopVectorizationPlanner::addReductionResultComputation(
68966886
VPlanPtr &Plan, VPRecipeBuilder &RecipeBuilder, ElementCount MinVF) {
68976887
using namespace VPlanPatternMatch;
6898-
VPTypeAnalysis TypeInfo(*Plan);
68996888
VPRegionBlock *VectorLoopRegion = Plan->getVectorLoopRegion();
69006889
VPBasicBlock *MiddleVPBB = Plan->getMiddleBlock();
69016890
VPBasicBlock *LatchVPBB = VectorLoopRegion->getExitingBasicBlock();
@@ -6911,7 +6900,7 @@ void LoopVectorizationPlanner::addReductionResultComputation(
69116900
RecurKind RecurrenceKind = PhiR->getRecurrenceKind();
69126901
const RecurrenceDescriptor &RdxDesc = Legal->getRecurrenceDescriptor(
69136902
cast<PHINode>(PhiR->getUnderlyingInstr()));
6914-
Type *PhiTy = TypeInfo.inferScalarType(PhiR);
6903+
Type *PhiTy = PhiR->getScalarType();
69156904

69166905
// Convert a VPBlendRecipe backedge to a select.
69176906
if (auto *Blend = dyn_cast<VPBlendRecipe>(PhiR->getBackedgeValue())) {
@@ -7488,7 +7477,9 @@ preparePlanForMainVectorLoop(VPlan &MainPlan, VPlan &EpiPlan) {
74887477
});
74897478
VPPhi *ResumePhi = nullptr;
74907479
if (ResumePhiIter == MainScalarPH->phis().end()) {
7491-
Type *Ty = VPTypeAnalysis(MainPlan).inferScalarType(VectorTC);
7480+
assert(MainPlan.getVectorLoopRegion()->getCanonicalIV() &&
7481+
"canonical IV must exist");
7482+
Type *Ty = VectorTC->getScalarType();
74927483
VPBuilder ScalarPHBuilder(MainScalarPH, MainScalarPH->begin());
74937484
ResumePhi = ScalarPHBuilder.createScalarPhi(
74947485
{VectorTC, MainPlan.getZero(Ty)}, {}, "vec.epilog.resume.val");

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ VPTransformState::VPTransformState(const TargetTransformInfo *TTI,
274274
ElementCount VF, LoopInfo *LI,
275275
DominatorTree *DT, AssumptionCache *AC,
276276
IRBuilderBase &Builder, VPlan *Plan,
277-
Loop *CurrentParentLoop, Type *CanonicalIVTy)
277+
Loop *CurrentParentLoop)
278278
: TTI(TTI), VF(VF), CFG(DT), LI(LI), AC(AC), Builder(Builder), Plan(Plan),
279-
CurrentParentLoop(CurrentParentLoop), TypeAnalysis(*Plan), VPDT(*Plan) {}
279+
CurrentParentLoop(CurrentParentLoop), VPDT(*Plan) {}
280280

281281
Value *VPTransformState::get(const VPValue *Def, const VPLane &Lane) {
282282
if (isa<VPIRValue, VPSymbolicValue>(Def))
@@ -1653,9 +1653,7 @@ std::string VPSlotTracker::getOrCreateName(const VPValue *V) const {
16531653
VPInstruction *VPBuilder::createAnyOfReduction(VPValue *ChainOp,
16541654
VPValue *TrueVal,
16551655
VPValue *FalseVal, DebugLoc DL) {
1656-
assert(VPTypeAnalysis(*getInsertBlock()->getPlan())
1657-
.inferScalarType(ChainOp)
1658-
->isIntegerTy(1) &&
1656+
assert(ChainOp->getScalarType()->isIntegerTy(1) &&
16591657
"ChainOp must be i1 for AnyOf reduction");
16601658
VPIRFlags Flags(RecurKind::Or, /*IsOrdered=*/false, /*IsInLoop=*/false,
16611659
FastMathFlags());
@@ -1899,7 +1897,7 @@ InstructionCost VPCostContext::getScalarizationOverhead(
18991897
cast<VPReplicateRecipe>(Op)->getOpcode() == Instruction::Load) ||
19001898
!UniqueOperands.insert(Op).second)
19011899
continue;
1902-
Tys.push_back(toVectorizedTy(Types.inferScalarType(Op), VF));
1900+
Tys.push_back(toVectorizedTy(Op->getScalarType(), VF));
19031901
}
19041902
return ScalarizationCost +
19051903
TTI.getOperandsScalarizationOverhead(Tys, CostKind, VIC);
@@ -1932,7 +1930,7 @@ bool VPCostContext::useEmulatedMaskMemRefHack(const VPReplicateRecipe *R,
19321930
if (!isa<StoreInst>(RepR->getUnderlyingInstr()))
19331931
continue;
19341932
// Check if scatter is legal for this store. If so, don't count it.
1935-
Type *Ty = Types.inferScalarType(RepR->getOperand(0));
1933+
Type *Ty = RepR->getOperand(0)->getScalarType();
19361934
auto *VTy = VectorType::get(Ty, VF);
19371935
const Align Alignment =
19381936
getLoadStoreAlignment(RepR->getUnderlyingInstr());

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -598,13 +598,6 @@ class LLVM_ABI_FOR_TEST VPRecipeBase
598598
return R->getVPRecipeID() == VPRecipeID; \
599599
}
600600

601-
/// Return the scalar type of \p V. If \p V's scalar type has not been set
602-
/// because the defining recipe was not assigned one yet, fall back to
603-
/// VPTypeAnalysis using the plan of the defining recipe.
604-
/// TODO: Remove once all VPRecipeValues have been migrated to carry their
605-
/// types.
606-
LLVM_ABI Type *getScalarTypeOrInfer(VPValue *V);
607-
608601
/// Compute the scalar result type for an IR \p Opcode given \p Operands.
609602
LLVM_ABI Type *computeScalarTypeForInstruction(unsigned Opcode,
610603
ArrayRef<VPValue *> Operands);
@@ -2204,7 +2197,7 @@ class LLVM_ABI_FOR_TEST VPWidenGEPRecipe : public VPRecipeWithIRFlags {
22042197
DebugLoc DL = DebugLoc::getUnknown(),
22052198
GetElementPtrInst *UV = nullptr)
22062199
: VPRecipeWithIRFlags(VPRecipeBase::VPWidenGEPSC, Operands,
2207-
getScalarTypeOrInfer(Operands[0]), Flags, DL),
2200+
Operands[0]->getScalarType(), Flags, DL),
22082201
SourceElementTy(SourceElementTy) {
22092202
if (UV) {
22102203
setUnderlyingValue(UV);
@@ -2266,7 +2259,7 @@ class VPVectorEndPointerRecipe : public VPRecipeWithIRFlags {
22662259
VPVectorEndPointerRecipe(VPValue *Ptr, VPValue *VF, Type *SourceElementTy,
22672260
int64_t Stride, GEPNoWrapFlags GEPFlags, DebugLoc DL)
22682261
: VPRecipeWithIRFlags(VPRecipeBase::VPVectorEndPointerSC, {Ptr, VF},
2269-
getScalarTypeOrInfer(Ptr), GEPFlags, DL),
2262+
Ptr->getScalarType(), GEPFlags, DL),
22702263
SourceElementTy(SourceElementTy), Stride(Stride) {
22712264
assert(Stride < 0 && "Stride must be negative");
22722265
}
@@ -2337,7 +2330,7 @@ class VPVectorPointerRecipe : public VPRecipeWithIRFlags {
23372330
GEPNoWrapFlags GEPFlags, DebugLoc DL)
23382331
: VPRecipeWithIRFlags(VPRecipeBase::VPVectorPointerSC,
23392332
ArrayRef<VPValue *>({Ptr, Stride}),
2340-
getScalarTypeOrInfer(Ptr), GEPFlags, DL),
2333+
Ptr->getScalarType(), GEPFlags, DL),
23412334
SourceElementTy(SourceElementTy) {}
23422335

23432336
VP_CLASSOF_IMPL(VPRecipeBase::VPVectorPointerSC)
@@ -2415,7 +2408,7 @@ class LLVM_ABI_FOR_TEST VPHeaderPHIRecipe : public VPSingleDefRecipe,
24152408
VPHeaderPHIRecipe(unsigned char VPRecipeID, Instruction *UnderlyingInstr,
24162409
VPValue *Start, DebugLoc DL = DebugLoc::getUnknown())
24172410
: VPHeaderPHIRecipe(VPRecipeID, UnderlyingInstr, Start,
2418-
getScalarTypeOrInfer(Start), DL) {}
2411+
Start->getScalarType(), DL) {}
24192412

24202413
VPHeaderPHIRecipe(unsigned char VPRecipeID, Instruction *UnderlyingInstr,
24212414
VPValue *Start, Type *ResultTy, DebugLoc DL)
@@ -2489,7 +2482,7 @@ class VPWidenInductionRecipe : public VPHeaderPHIRecipe {
24892482
VPValue *Step, const InductionDescriptor &IndDesc,
24902483
DebugLoc DL)
24912484
: VPWidenInductionRecipe(Kind, IV, Start, Step, IndDesc,
2492-
getScalarTypeOrInfer(Start), DL) {}
2485+
Start->getScalarType(), DL) {}
24932486

24942487
VPWidenInductionRecipe(unsigned char Kind, PHINode *IV, VPValue *Start,
24952488
VPValue *Step, const InductionDescriptor &IndDesc,
@@ -2715,7 +2708,7 @@ class LLVM_ABI_FOR_TEST VPWidenPHIRecipe : public VPSingleDefRecipe,
27152708
VPWidenPHIRecipe(ArrayRef<VPValue *> IncomingValues,
27162709
DebugLoc DL = DebugLoc::getUnknown(), const Twine &Name = "")
27172710
: VPSingleDefRecipe(VPRecipeBase::VPWidenPHISC, IncomingValues,
2718-
getScalarTypeOrInfer(IncomingValues[0]),
2711+
IncomingValues[0]->getScalarType(),
27192712
/*UV=*/nullptr, DL),
27202713
Name(Name.str()) {
27212714
assert(all_of(IncomingValues,
@@ -3643,7 +3636,7 @@ class LLVM_ABI_FOR_TEST VPPredInstPHIRecipe : public VPSingleDefRecipe {
36433636
/// nodes after merging back from a Branch-on-Mask.
36443637
VPPredInstPHIRecipe(VPValue *PredV, DebugLoc DL)
36453638
: VPSingleDefRecipe(VPRecipeBase::VPPredInstPHISC, PredV,
3646-
getScalarTypeOrInfer(PredV), /*UV=*/nullptr, DL) {}
3639+
PredV->getScalarType(), /*UV=*/nullptr, DL) {}
36473640
~VPPredInstPHIRecipe() override = default;
36483641

36493642
VPPredInstPHIRecipe *clone() override {
@@ -4179,7 +4172,7 @@ class LLVM_ABI_FOR_TEST VPScalarIVStepsRecipe : public VPRecipeWithIRFlags {
41794172
Instruction::BinaryOps Opcode, FastMathFlags FMFs,
41804173
DebugLoc DL)
41814174
: VPRecipeWithIRFlags(VPRecipeBase::VPScalarIVStepsSC, {IV, Step, VF},
4182-
getScalarTypeOrInfer(IV), FMFs, DL),
4175+
IV->getScalarType(), FMFs, DL),
41834176
InductionOpcode(Opcode) {}
41844177

41854178
VPScalarIVStepsRecipe(const InductionDescriptor &IndDesc, VPValue *IV,

llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,13 @@
1313
#include "VPlanHelpers.h"
1414
#include "VPlanPatternMatch.h"
1515
#include "llvm/ADT/PostOrderIterator.h"
16-
#include "llvm/Analysis/ScalarEvolution.h"
1716
#include "llvm/Analysis/TargetTransformInfo.h"
18-
#include "llvm/IR/Instruction.h"
1917

2018
using namespace llvm;
2119
using namespace VPlanPatternMatch;
2220

2321
#define DEBUG_TYPE "vplan"
2422

25-
Type *VPTypeAnalysis::inferScalarType(const VPValue *V) {
26-
Type *Ty = V->getScalarType();
27-
assert(Ty && "Scalar type must be set by recipe construction");
28-
return Ty;
29-
}
30-
3123
void llvm::collectEphemeralRecipesForVPlan(
3224
VPlan &Plan, DenseSet<VPRecipeBase *> &EphRecipes) {
3325
// First, collect seed recipes which are operands of assumes.
@@ -195,8 +187,6 @@ SmallVector<VPRegisterUsage, 8> llvm::calculateRegisterUsageForPlan(
195187

196188
LLVM_DEBUG(dbgs() << "LV(REG): Calculating max register usage:\n");
197189

198-
VPTypeAnalysis TypeInfo(Plan);
199-
200190
const auto &TTICapture = TTI;
201191
auto GetRegUsage = [&TTICapture](Type *Ty, ElementCount VF) -> unsigned {
202192
if (Ty->isTokenTy() || !VectorType::isValidElementType(Ty) ||
@@ -265,7 +255,7 @@ SmallVector<VPRegisterUsage, 8> llvm::calculateRegisterUsageForPlan(
265255
(isa<VPReductionPHIRecipe>(VPV) &&
266256
(cast<VPReductionPHIRecipe>(VPV))->isInLoop())) {
267257
unsigned ClassID =
268-
TTI.getRegisterClassForType(false, TypeInfo.inferScalarType(VPV));
258+
TTI.getRegisterClassForType(false, VPV->getScalarType());
269259
// FIXME: The target might use more than one register for the type
270260
// even in the scalar case.
271261
RegUsage[ClassID] += 1;
@@ -281,7 +271,7 @@ SmallVector<VPRegisterUsage, 8> llvm::calculateRegisterUsageForPlan(
281271
<< " to " << VF << " for " << *R << "\n";);
282272
}
283273

284-
Type *ScalarTy = TypeInfo.inferScalarType(VPV);
274+
Type *ScalarTy = VPV->getScalarType();
285275
unsigned ClassID = TTI.getRegisterClassForType(true, ScalarTy);
286276
RegUsage[ClassID] += GetRegUsage(ScalarTy, VF);
287277
}
@@ -320,9 +310,9 @@ SmallVector<VPRegisterUsage, 8> llvm::calculateRegisterUsageForPlan(
320310
bool IsScalar = vputils::onlyScalarValuesUsed(In);
321311

322312
ElementCount VF = IsScalar ? ElementCount::getFixed(1) : VFs[Idx];
323-
unsigned ClassID = TTI.getRegisterClassForType(
324-
VF.isVector(), TypeInfo.inferScalarType(In));
325-
Invariant[ClassID] += GetRegUsage(TypeInfo.inferScalarType(In), VF);
313+
unsigned ClassID =
314+
TTI.getRegisterClassForType(VF.isVector(), In->getScalarType());
315+
Invariant[ClassID] += GetRegUsage(In->getScalarType(), VF);
326316
}
327317

328318
LLVM_DEBUG({

llvm/lib/Transforms/Vectorize/VPlanAnalysis.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,13 @@
1919

2020
namespace llvm {
2121

22-
class LLVMContext;
23-
class VPValue;
2422
class VPRecipeBase;
2523
class VPlan;
26-
class Value;
2724
class TargetTransformInfo;
28-
class Type;
2925
class InstructionCost;
3026

3127
struct VPCostContext;
3228

33-
/// An analysis for type-inference for VPValues.
34-
/// It infers the scalar type for a given VPValue by bottom-up traversing
35-
/// through defining recipes until root nodes with known types are reached (e.g.
36-
/// live-ins or load recipes). The types are then propagated top down through
37-
/// operations.
38-
/// Note that the analysis caches the inferred types. A new analysis object must
39-
/// be constructed once a VPlan has been modified in a way that invalidates any
40-
/// of the previously inferred types.
41-
class VPTypeAnalysis {
42-
DenseMap<const VPValue *, Type *> CachedTypes;
43-
LLVMContext &Ctx;
44-
const DataLayout &DL;
45-
46-
public:
47-
VPTypeAnalysis(const VPlan &Plan)
48-
: Ctx(Plan.getContext()), DL(Plan.getDataLayout()) {}
49-
50-
/// Infer the type of \p V. Returns the scalar type of \p V.
51-
Type *inferScalarType(const VPValue *V);
52-
53-
/// Return the LLVMContext used by the analysis.
54-
LLVMContext &getContext() { return Ctx; }
55-
};
56-
5729
// Collect a VPlan's ephemeral recipes (those used only by an assume).
5830
void collectEphemeralRecipesForVPlan(VPlan &Plan,
5931
DenseSet<VPRecipeBase *> &EphRecipes);

llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,6 @@ bool VPlanTransforms::finalizeSCEVPredicates(VPlan &Plan,
10461046

10471047
void VPlanTransforms::createInLoopReductionRecipes(VPlan &Plan,
10481048
ElementCount MinVF) {
1049-
VPTypeAnalysis TypeInfo(Plan);
10501049
VPBasicBlock *Header = Plan.getVectorLoopRegion()->getEntryBasicBlock();
10511050
SmallVector<VPRecipeBase *> ToDelete;
10521051

@@ -1141,7 +1140,7 @@ void VPlanTransforms::createInLoopReductionRecipes(VPlan &Plan,
11411140
VecOp = FMulRecipe;
11421141
} else if (Kind == RecurKind::AddChainWithSubs &&
11431142
match(CurrentLink, m_Sub(m_VPValue(), m_VPValue()))) {
1144-
Type *PhiTy = TypeInfo.inferScalarType(PhiR);
1143+
Type *PhiTy = PhiR->getScalarType();
11451144
auto *Zero = Plan.getConstantInt(PhiTy, 0);
11461145
VPBuilder Builder(LinkVPBB, CurrentLink->getIterator());
11471146
auto *Sub = Builder.createSub(Zero, CurrentLink->getOperand(1),
@@ -1236,7 +1235,7 @@ static bool areAllLoadsDereferenceable(VPBasicBlock *HeaderVPBB, Loop *TheLoop,
12361235
}
12371236

12381237
// Check dereferenceability using the SCEV-based version.
1239-
Type *LoadTy = VPI->getResultType();
1238+
Type *LoadTy = VPI->getScalarType();
12401239
const SCEV *SizeSCEV =
12411240
SE.getStoreSizeOfExpr(DL.getIndexType(PtrSCEV->getType()), LoadTy);
12421241
auto *Load = cast<LoadInst>(VPI->getUnderlyingValue());
@@ -1403,12 +1402,11 @@ void VPlanTransforms::foldTailByMasking(VPlan &Plan) {
14031402

14041403
// Insert phis for values coming past the end of the tail.
14051404
Builder.setInsertPoint(Latch, Latch->begin());
1406-
VPTypeAnalysis TypeInfo(Plan);
14071405
for (const auto &[V, Users] : NeedsPhi) {
14081406
if (isa<VPIRValue>(V))
14091407
continue;
14101408
VPValue *TailVal =
1411-
Plan.getOrAddLiveIn(PoisonValue::get(TypeInfo.inferScalarType(V)));
1409+
Plan.getOrAddLiveIn(PoisonValue::get(V->getScalarType()));
14121410
VPIRFlags Flags;
14131411
assert(llvm::count_if(Users, IsaPred<VPReductionPHIRecipe>) <= 1 &&
14141412
"Value used by more than two reduction phis?");
@@ -1938,7 +1936,7 @@ static bool handleFirstArgMinOrMax(
19381936
Type *Ty = Plan.getVectorLoopRegion()->getCanonicalIVType();
19391937
// TODO: Support non (i.e., narrower than) canonical IV types.
19401938
// TODO: Emit remarks for failed transformations.
1941-
if (Ty != VPTypeAnalysis(Plan).inferScalarType(WideIV))
1939+
if (Ty != WideIV->getScalarType())
19421940
return false;
19431941

19441942
auto *FindIVSelectR = cast<VPSingleDefRecipe>(

0 commit comments

Comments
 (0)