Skip to content

Commit 84af6da

Browse files
committed
!fixup
1 parent ad35c37 commit 84af6da

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7949,8 +7949,8 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
79497949
BestVPlan, BestVF,
79507950
TTI.getRegisterBitWidth(TargetTransformInfo::RGK_FixedWidthVector));
79517951
VPlanTransforms::removeDeadRecipes(BestVPlan);
7952-
VPlanTransforms::convertToConcreteRecipes(BestVPlan,
7953-
Legal->getWidestInductionType());
7952+
VPTypeAnalysis TypeInfo(Legal->getWidestInductionType());
7953+
VPlanTransforms::convertToConcreteRecipes(BestVPlan, TypeInfo);
79547954

79557955
// Perform the actual loop transformation.
79567956
VPTransformState State(&TTI, BestVF, LI, DT, ILV.Builder, &ILV, &BestVPlan,

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,9 +1099,19 @@ void VPInstructionWithType::print(raw_ostream &O, const Twine &Indent,
10991099
VPSlotTracker &SlotTracker) const {
11001100
O << Indent << "EMIT ";
11011101
printAsOperand(O, SlotTracker);
1102-
O << " = " << Instruction::getOpcodeName(getOpcode()) << " ";
1103-
printOperands(O, SlotTracker);
1104-
O << " to " << *ResultTy;
1102+
O << " = ";
1103+
1104+
switch (getOpcode()) {
1105+
case VPInstruction::WideIVStep:
1106+
O << "wide-iv-step";
1107+
printOperands(O, SlotTracker);
1108+
break;
1109+
default:
1110+
assert(Instruction::isCast(getOpcode()) && "unhandled opcode");
1111+
O << Instruction::getOpcodeName(getOpcode()) << " ";
1112+
printOperands(O, SlotTracker);
1113+
O << " to " << *ResultTy;
1114+
}
11051115
}
11061116
#endif
11071117

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2378,9 +2378,8 @@ void VPlanTransforms::createInterleaveGroups(
23782378
}
23792379

23802380
void VPlanTransforms::convertToConcreteRecipes(VPlan &Plan,
2381-
Type *CanonicalIVTy) {
2381+
VPTypeAnalysis &TypeInfo) {
23822382
using namespace llvm::VPlanPatternMatch;
2383-
VPTypeAnalysis TypeInfo(CanonicalIVTy);
23842383

23852384
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
23862385
vp_depth_first_deep(Plan.getEntry()))) {

llvm/lib/Transforms/Vectorize/VPlanTransforms.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ struct VPlanTransforms {
177177
VPRecipeBuilder &RecipeBuilder);
178178

179179
/// Lower abstract recipes to concrete ones, that can be codegen'd.
180-
static void convertToConcreteRecipes(VPlan &Plan, Type *CanonicalIVTy);
180+
static void convertToConcreteRecipes(VPlan &Plan, VPTypeAnalysis &TypeInfo);
181181

182182
/// Perform instcombine-like simplifications on recipes in \p Plan. Use \p
183183
/// CanonicalIVTy as type for all un-typed live-ins in VPTypeAnalysis.

0 commit comments

Comments
 (0)