Skip to content

Commit 1693f98

Browse files
committed
!fixup address latest comments
1 parent 1aeee98 commit 1693f98

14 files changed

+140
-114
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8175,11 +8175,9 @@ VPRecipeBase *VPRecipeBuilder::tryToWidenMemory(Instruction *I,
81758175
Reverse || Decision == LoopVectorizationCostModel::CM_Widen;
81768176

81778177
VPValue *Ptr = isa<LoadInst>(I) ? Operands[0] : Operands[1];
8178-
if (Decision != LoopVectorizationCostModel::CM_GatherScatter &&
8179-
Decision != LoopVectorizationCostModel::CM_Interleave) {
8180-
auto *VectorPtr = new VPInstruction(
8181-
Reverse ? VPInstruction::VectorPtrReverse : VPInstruction::VectorPtr,
8182-
{Ptr}, I->getDebugLoc());
8178+
if (Consecutive) {
8179+
auto *VectorPtr = new VPVectorPointerRecipe(Ptr, getLoadStoreType(I),
8180+
Reverse, I->getDebugLoc());
81838181
Builder.getInsertBlock()->appendRecipe(VectorPtr);
81848182
Ptr = VectorPtr;
81858183
}

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,9 +1061,7 @@ class VPInstruction : public VPRecipeWithIRFlags, public VPValue {
10611061
// Increment the canonical IV separately for each unrolled part.
10621062
CanonicalIVIncrementForPart,
10631063
BranchOnCount,
1064-
BranchOnCond,
1065-
VectorPtr,
1066-
VectorPtrReverse
1064+
BranchOnCond
10671065
};
10681066

10691067
private:
@@ -1170,8 +1168,6 @@ class VPInstruction : public VPRecipeWithIRFlags, public VPValue {
11701168
case VPInstruction::CalculateTripCountMinusVF:
11711169
case VPInstruction::CanonicalIVIncrementForPart:
11721170
case VPInstruction::BranchOnCount:
1173-
case VPInstruction::VectorPtr:
1174-
case VPInstruction::VectorPtrReverse:
11751171
return true;
11761172
};
11771173
llvm_unreachable("switch should return");
@@ -1361,6 +1357,36 @@ class VPWidenGEPRecipe : public VPRecipeWithIRFlags, public VPValue {
13611357
#endif
13621358
};
13631359

1360+
/// A recipe to compute the pointers for widened memory accesses of IndexTy for
1361+
/// all parts. If IsReverse is true, compute pointers for accessing the input in
1362+
/// reverse order per part.
1363+
class VPVectorPointerRecipe : public VPRecipeBase, public VPValue {
1364+
Type *IndexedTy;
1365+
bool IsReverse;
1366+
1367+
public:
1368+
VPVectorPointerRecipe(VPValue *Ptr, Type *IndexedTy, bool IsReverse,
1369+
DebugLoc DL)
1370+
: VPRecipeBase(VPDef::VPVectorPointerSC, {Ptr}, DL), VPValue(this),
1371+
IndexedTy(IndexedTy), IsReverse(IsReverse) {}
1372+
1373+
VP_CLASSOF_IMPL(VPDef::VPVectorPointerSC)
1374+
1375+
void execute(VPTransformState &State) override;
1376+
1377+
bool onlyFirstLaneUsed(const VPValue *Op) const override {
1378+
assert(is_contained(operands(), Op) &&
1379+
"Op must be an operand of the recipe");
1380+
return true;
1381+
}
1382+
1383+
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1384+
/// Print the recipe.
1385+
void print(raw_ostream &O, const Twine &Indent,
1386+
VPSlotTracker &SlotTracker) const override;
1387+
#endif
1388+
};
1389+
13641390
/// A pure virtual base class for all recipes modeling header phis, including
13651391
/// phis for first order recurrences, pointer inductions and reductions. The
13661392
/// start value is the first operand of the recipe and the incoming value from

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ bool VPRecipeBase::mayHaveSideEffects() const {
121121
case VPInstruction::Not:
122122
case VPInstruction::CalculateTripCountMinusVF:
123123
case VPInstruction::CanonicalIVIncrementForPart:
124-
case VPInstruction::VectorPtr:
125-
case VPInstruction::VectorPtrReverse:
126124
return false;
127125
default:
128126
return true;
@@ -399,50 +397,6 @@ Value *VPInstruction::generateInstruction(VPTransformState &State,
399397
Builder.GetInsertBlock()->getTerminator()->eraseFromParent();
400398
return CondBr;
401399
}
402-
case VPInstruction::VectorPtr:
403-
case VPInstruction::VectorPtrReverse: {
404-
// Calculate the pointer for the specific unroll-part.
405-
Value *PartPtr = nullptr;
406-
bool IsReverse = getOpcode() == VPInstruction::VectorPtrReverse;
407-
auto *MemR = cast<VPWidenMemoryInstructionRecipe>(*user_begin());
408-
Type *ScalarDataTy =
409-
MemR->isStore() ? cast<StoreInst>(&MemR->getIngredient())
410-
->getValueOperand()
411-
->getType()
412-
: cast<LoadInst>(&MemR->getIngredient())->getType();
413-
// Use i32 for the gep index type when the value is constant,
414-
// or query DataLayout for a more suitable index type otherwise.
415-
const DataLayout &DL =
416-
Builder.GetInsertBlock()->getModule()->getDataLayout();
417-
Type *IndexTy = State.VF.isScalable() && (IsReverse || Part > 0)
418-
? DL.getIndexType(ScalarDataTy->getPointerTo())
419-
: Builder.getInt32Ty();
420-
Value *Ptr = State.get(getOperand(0), VPIteration(0, 0));
421-
bool InBounds = false;
422-
if (auto *GEP = dyn_cast<GetElementPtrInst>(Ptr->stripPointerCasts()))
423-
InBounds = GEP->isInBounds();
424-
if (IsReverse) {
425-
// If the address is consecutive but reversed, then the
426-
// wide store needs to start at the last vector element.
427-
// RunTimeVF = VScale * VF.getKnownMinValue()
428-
// For fixed-width VScale is 1, then RunTimeVF = VF.getKnownMinValue()
429-
Value *RunTimeVF = getRuntimeVF(Builder, IndexTy, State.VF);
430-
// NumElt = -Part * RunTimeVF
431-
Value *NumElt = Builder.CreateMul(
432-
ConstantInt::get(IndexTy, -(int64_t)Part), RunTimeVF);
433-
// LastLane = 1 - RunTimeVF
434-
Value *LastLane =
435-
Builder.CreateSub(ConstantInt::get(IndexTy, 1), RunTimeVF);
436-
PartPtr = Builder.CreateGEP(ScalarDataTy, Ptr, NumElt, "", InBounds);
437-
PartPtr =
438-
Builder.CreateGEP(ScalarDataTy, PartPtr, LastLane, "", InBounds);
439-
} else {
440-
Value *Increment = createStepForVF(Builder, IndexTy, State.VF, Part);
441-
PartPtr = Builder.CreateGEP(ScalarDataTy, Ptr, Increment, "", InBounds);
442-
}
443-
444-
return PartPtr;
445-
}
446400
default:
447401
llvm_unreachable("Unsupported opcode for instruction");
448402
}
@@ -519,12 +473,6 @@ void VPInstruction::print(raw_ostream &O, const Twine &Indent,
519473
case VPInstruction::BranchOnCount:
520474
O << "branch-on-count";
521475
break;
522-
case VPInstruction::VectorPtr:
523-
O << "vector-pointer";
524-
break;
525-
case VPInstruction::VectorPtrReverse:
526-
O << "vector-pointer-reverse";
527-
break;
528476
default:
529477
O << Instruction::getOpcodeName(getOpcode());
530478
}
@@ -1257,6 +1205,59 @@ void VPWidenGEPRecipe::print(raw_ostream &O, const Twine &Indent,
12571205
}
12581206
#endif
12591207

1208+
void VPVectorPointerRecipe ::execute(VPTransformState &State) {
1209+
auto &Builder = State.Builder;
1210+
State.setDebugLocFrom(getDebugLoc());
1211+
for (unsigned Part = 0; Part < State.UF; ++Part) {
1212+
// Calculate the pointer for the specific unroll-part.
1213+
Value *PartPtr = nullptr;
1214+
// Use i32 for the gep index type when the value is constant,
1215+
// or query DataLayout for a more suitable index type otherwise.
1216+
const DataLayout &DL =
1217+
Builder.GetInsertBlock()->getModule()->getDataLayout();
1218+
Type *IndexTy = State.VF.isScalable() && (IsReverse || Part > 0)
1219+
? DL.getIndexType(IndexedTy->getPointerTo())
1220+
: Builder.getInt32Ty();
1221+
Value *Ptr = State.get(getOperand(0), VPIteration(0, 0));
1222+
bool InBounds = false;
1223+
if (auto *GEP = dyn_cast<GetElementPtrInst>(Ptr->stripPointerCasts()))
1224+
InBounds = GEP->isInBounds();
1225+
if (IsReverse) {
1226+
// If the address is consecutive but reversed, then the
1227+
// wide store needs to start at the last vector element.
1228+
// RunTimeVF = VScale * VF.getKnownMinValue()
1229+
// For fixed-width VScale is 1, then RunTimeVF = VF.getKnownMinValue()
1230+
Value *RunTimeVF = getRuntimeVF(Builder, IndexTy, State.VF);
1231+
// NumElt = -Part * RunTimeVF
1232+
Value *NumElt = Builder.CreateMul(
1233+
ConstantInt::get(IndexTy, -(int64_t)Part), RunTimeVF);
1234+
// LastLane = 1 - RunTimeVF
1235+
Value *LastLane =
1236+
Builder.CreateSub(ConstantInt::get(IndexTy, 1), RunTimeVF);
1237+
PartPtr = Builder.CreateGEP(IndexedTy, Ptr, NumElt, "", InBounds);
1238+
PartPtr = Builder.CreateGEP(IndexedTy, PartPtr, LastLane, "", InBounds);
1239+
} else {
1240+
Value *Increment = createStepForVF(Builder, IndexTy, State.VF, Part);
1241+
PartPtr = Builder.CreateGEP(IndexedTy, Ptr, Increment, "", InBounds);
1242+
}
1243+
1244+
State.set(this, PartPtr, Part);
1245+
}
1246+
}
1247+
1248+
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1249+
void VPVectorPointerRecipe::print(raw_ostream &O, const Twine &Indent,
1250+
VPSlotTracker &SlotTracker) const {
1251+
O << Indent;
1252+
printAsOperand(O, SlotTracker);
1253+
O << " = vector-pointer ";
1254+
if (IsReverse)
1255+
O << "(reverse) ";
1256+
1257+
printOperands(O, SlotTracker);
1258+
}
1259+
#endif
1260+
12601261
void VPBlendRecipe::execute(VPTransformState &State) {
12611262
State.setDebugLocFrom(getDebugLoc());
12621263
// We know that all PHIs in non-header blocks are converted into

llvm/lib/Transforms/Vectorize/VPlanValue.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ class VPDef {
358358
VPReductionSC,
359359
VPReplicateSC,
360360
VPScalarIVStepsSC,
361+
VPVectorPointerSC,
361362
VPWidenCallSC,
362363
VPWidenCanonicalIVSC,
363364
VPWidenCastSC,

llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding-forced.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ target triple = "aarch64-unknown-linux-gnu"
2929
; VPLANS-NEXT: ACTIVE-LANE-MASK-PHI vp<[[LANEMASK_PHI:%[0-9]+]]> = phi vp<[[LANEMASK_ENTRY]]>, vp<[[LANEMASK_LOOP:%[0-9]+]]>
3030
; VPLANS-NEXT: vp<[[STEP:%[0-9]+]]> = SCALAR-STEPS vp<[[INDV]]>, ir<1>
3131
; VPLANS-NEXT: CLONE ir<%gep> = getelementptr ir<%ptr>, vp<[[STEP]]>
32-
; VPLANS-NEXT: EMIT vp<[[VEC_PTR:%[0-9]+]]> = vector-pointer ir<%gep>
32+
; VPLANS-NEXT: vp<[[VEC_PTR:%[0-9]+]]> = vector-pointer ir<%gep>
3333
; VPLANS-NEXT: WIDEN store vp<[[VEC_PTR]]>, ir<%val>, vp<[[LANEMASK_PHI]]>
3434
; VPLANS-NEXT: EMIT vp<[[INDV_UPDATE:%[0-9]+]]> = add vp<[[INDV]]>, vp<[[VFxUF]]>
3535
; VPLANS-NEXT: EMIT vp<[[INC:%[0-9]+]]> = VF * Part + vp<[[INDV]]>

llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-gep.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ target triple = "aarch64-unknown-linux-gnu"
2222
; CHECK-NEXT: EMIT ir<%ptr.iv.1> = WIDEN-POINTER-INDUCTION ir<%start.1>, 8
2323
; CHECK-NEXT: EMIT ir<%ptr.iv.2> = WIDEN-POINTER-INDUCTION ir<%start.2>, 1
2424
; CHECK-NEXT: WIDEN-GEP Var[Inv] ir<%ptr.iv.2.next> = getelementptr inbounds ir<%ptr.iv.2>, ir<1>
25-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%ptr.iv.1>
25+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%ptr.iv.1>
2626
; CHECK-NEXT: WIDEN store vp<[[VEC_PTR]]>, ir<%ptr.iv.2.next>
27-
; CHECK-NEXT: EMIT vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%ptr.iv.2>
27+
; CHECK-NEXT: vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%ptr.iv.2>
2828
; CHECK-NEXT: WIDEN ir<%lv> = load vp<[[VEC_PTR2]]>
2929
; CHECK-NEXT: WIDEN ir<%add> = add ir<%lv>, ir<1>
30-
; CHECK-NEXT: EMIT vp<[[VEC_PTR3:%.+]]> = vector-pointer ir<%ptr.iv.2>
30+
; CHECK-NEXT: vp<[[VEC_PTR3:%.+]]> = vector-pointer ir<%ptr.iv.2>
3131
; CHECK-NEXT: WIDEN store vp<[[VEC_PTR3]]>, ir<%add>
3232
; CHECK-NEXT: EMIT vp<[[CAN_IV_NEXT:%.+]]> = add nuw vp<[[CAN_IV]]>, vp<[[VFxUF]]>
3333
; CHECK-NEXT: EMIT branch-on-count vp<[[CAN_IV_NEXT]]>, vp<[[VEC_TC]]>

llvm/test/Transforms/LoopVectorize/AArch64/synthesize-mask-for-call.ll

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ target triple = "aarch64-unknown-linux-gnu"
2222
; CHECK-NEXT: EMIT vp<[[CAN_IV:%.+]]> = CANONICAL-INDUCTION
2323
; CHECK-NEXT: vp<[[STEPS:%.+]]> = SCALAR-STEPS vp<[[CAN_IV]]>, ir<1>
2424
; CHECK-NEXT: CLONE ir<%gep> = getelementptr ir<%b>, vp<[[STEPS]]>
25-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
25+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
2626
; CHECK-NEXT: WIDEN ir<%load> = load vp<[[VEC_PTR]]>
2727
; CHECK-NEXT: REPLICATE ir<%call> = call @foo(ir<%load>)
2828
; CHECK-NEXT: CLONE ir<%arrayidx> = getelementptr inbounds ir<%a>, vp<[[STEPS]]>
29-
; CHECK-NEXT: EMIT vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%arrayidx>
29+
; CHECK-NEXT: vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%arrayidx>
3030
; CHECK-NEXT: WIDEN store vp<[[VEC_PTR2]]>, ir<%call>
3131
; CHECK-NEXT: EMIT vp<[[CAN_IV_NEXT:%.+]]> = add nuw vp<[[CAN_IV]]>, vp<[[VFxUF]]>
3232
; CHECK-NEXT: EMIT branch-on-count vp<[[CAN_IV_NEXT]]>, vp<[[VTC]]>
@@ -51,11 +51,11 @@ target triple = "aarch64-unknown-linux-gnu"
5151
; CHECK-NEXT: EMIT vp<[[CAN_IV:%.+]]> = CANONICAL-INDUCTION
5252
; CHECK-NEXT: vp<[[STEPS]]> = SCALAR-STEPS vp<[[CAN_IV]]>, ir<1>
5353
; CHECK-NEXT: CLONE ir<%gep> = getelementptr ir<%b>, vp<[[STEPS]]>
54-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
54+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
5555
; CHECK-NEXT: WIDEN ir<%load> = load vp<[[VEC_PTR]]>
5656
; CHECK-NEXT: WIDEN-CALL ir<%call> = call @foo(ir<%load>) (using library function: foo_vector_fixed4_nomask)
5757
; CHECK-NEXT: CLONE ir<%arrayidx> = getelementptr inbounds ir<%a>, vp<[[STEPS]]>
58-
; CHECK-NEXT: EMIT vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%arrayidx>
58+
; CHECK-NEXT: vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%arrayidx>
5959
; CHECK-NEXT: WIDEN store vp<[[VEC_PTR2]]>, ir<%call>
6060
; CHECK-NEXT: EMIT vp<[[CAN_IV_NEXT:%.+]]> = add nuw vp<[[CAN_IV]]>, vp<[[VFxUF]]>
6161
; CHECK-NEXT: EMIT branch-on-count vp<[[CAN_IV_NEXT]]>, vp<[[VTC]]>
@@ -85,11 +85,11 @@ target triple = "aarch64-unknown-linux-gnu"
8585
; CHECK-NEXT: EMIT vp<[[CAN_IV:%.+]]> = CANONICAL-INDUCTION
8686
; CHECK-NEXT: vp<[[STEPS:%.+]]> = SCALAR-STEPS vp<[[CAN_IV]]>, ir<1>
8787
; CHECK-NEXT: CLONE ir<%gep> = getelementptr ir<%b>, vp<[[STEPS]]>
88-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
88+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
8989
; CHECK-NEXT: WIDEN ir<%load> = load vp<[[VEC_PTR]]>
9090
; CHECK-NEXT: WIDEN-CALL ir<%call> = call @foo(ir<%load>) (using library function: foo_vector_fixed2_nomask)
9191
; CHECK-NEXT: CLONE ir<%arrayidx> = getelementptr inbounds ir<%a>, vp<[[STEPS]]>
92-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%arrayidx>
92+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%arrayidx>
9393
; CHECK-NEXT: WIDEN store vp<[[VEC_PTR]]>, ir<%call>
9494
; CHECK-NEXT: EMIT vp<[[CAN_IV_NEXST:%.+]]> = add nuw vp<[[CAN_IV]]>, vp<[[VFxUF]]>
9595
; CHECK-NEXT: EMIT branch-on-count vp<[[CAN_IV_NEXT]]>, vp<[[VTC]]>
@@ -114,11 +114,11 @@ target triple = "aarch64-unknown-linux-gnu"
114114
; CHECK-NEXT: EMIT vp<[[CAN_IV:%.+]]> = CANONICAL-INDUCTION
115115
; CHECK-NEXT: vp<[[STEPS:%.+]]> = SCALAR-STEPS vp<[[CAN_IV]]>, ir<1>
116116
; CHECK-NEXT: CLONE ir<%gep> = getelementptr ir<%b>, vp<[[STEPS]]>
117-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
117+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
118118
; CHECK-NEXT: WIDEN ir<%load> = load vp<[[VEC_PTR]]>
119119
; CHECK-NEXT: WIDEN-CALL ir<%call> = call @foo(ir<%load>, ir<true>) (using library function: foo_vector_fixed4_mask)
120120
; CHECK-NEXT: CLONE ir<%arrayidx> = getelementptr inbounds ir<%a>, vp<[[STEPS]]>
121-
; CHECK-NEXT: EMIT vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%arrayidx>
121+
; CHECK-NEXT: vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%arrayidx>
122122
; CHECK-NEXT: WIDEN store vp<[[VEC_PTR2]]>, ir<%call>
123123
; CHECK-NEXT: EMIT vp<[[CAN_IV_NEXT:%.+]]> = add nuw vp<[[CAN_IV]]>, vp<[[VFxUF]]>
124124
; CHECK-NEXT: EMIT branch-on-count vp<[[CAN_IV_NEXT]]>, vp<[[VTC]]>
@@ -147,11 +147,11 @@ target triple = "aarch64-unknown-linux-gnu"
147147
; CHECK-NEXT: EMIT vp<[[CAN_IV:%.+]]> = CANONICAL-INDUCTION
148148
; CHECK-NEXT: vp<[[STEPS:%.+]]> = SCALAR-STEPS vp<[[CAN_IV]]>, ir<1>
149149
; CHECK-NEXT: CLONE ir<%gep> = getelementptr ir<%b>, vp<[[STEPS]]>
150-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
150+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
151151
; CHECK-NEXT: WIDEN ir<%load> = load vp<[[VEC_PTR]]>
152152
; CHECK-NEXT: WIDEN-CALL ir<%call> = call @foo(ir<%load>) (using library function: foo_vector_fixed2_nomask)
153153
; CHECK-NEXT: CLONE ir<%arrayidx> = getelementptr inbounds ir<%a>, vp<[[STEPS]]>
154-
; CHECK-NEXT: EMIT vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%arrayidx>
154+
; CHECK-NEXT: vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%arrayidx>
155155
; CHECK-NEXT: WIDEN store vp<[[VEC_PTR2]]>, ir<%call>
156156
; CHECK-NEXT: EMIT vp<[[CAN_IV_NEXT:%.+]]> = add nuw vp<[[CAN_IV]]>, vp<[[VFxUF]]>
157157
; CHECK-NEXT: EMIT branch-on-count vp<[[CAN_IV_NEXT]]>, vp<[[VTC]]>
@@ -176,11 +176,11 @@ target triple = "aarch64-unknown-linux-gnu"
176176
; CHECK-NEXT: EMIT vp<[[CAN_IV:%.+]]> = CANONICAL-INDUCTION
177177
; CHECK-NEXT: vp<[[STEPS:%.+]]> = SCALAR-STEPS vp<[[CAN_IV]]>, ir<1>
178178
; CHECK-NEXT: CLONE ir<%gep> = getelementptr ir<%b>, vp<[[STEPS]]>
179-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
179+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep>
180180
; CHECK-NEXT: WIDEN ir<%load> = load vp<[[VEC_PTR]]>
181181
; CHECK-NEXT: WIDEN-CALL ir<%call> = call @foo(ir<%load>) (using library function: foo_vector_fixed4_nomask)
182182
; CHECK-NEXT: CLONE ir<%arrayidx> = getelementptr inbounds ir<%a>, vp<[[STEPS]]>
183-
; CHECK-NEXT: EMIT vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%arrayidx>
183+
; CHECK-NEXT: vp<[[VEC_PTR2:%.+]]> = vector-pointer ir<%arrayidx>
184184
; CHECK-NEXT: WIDEN store vp<[[VEC_PTR2]]>, ir<%call>
185185
; CHECK-NEXT: EMIT vp<[[CAN_IV_NEXT:%.+]]> = add nuw vp<[[CAN_IV]]>, vp<[[VFxUF]]>
186186
; CHECK-NEXT: EMIT branch-on-count vp<[[CAN_IV_NEXT]]>, vp<[[VTC]]>

llvm/test/Transforms/LoopVectorize/AArch64/widen-call-with-intrinsic-or-libfunc.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ target triple = "arm64-apple-ios"
2020
; CHECK-NEXT: EMIT vp<[[CAN_IV:%.+]]> = CANONICAL-INDUCTION
2121
; CHECK-NEXT: vp<[[STEPS:%.+]]> = SCALAR-STEPS vp<[[CAN_IV]]>, ir<1>
2222
; CHECK-NEXT: CLONE ir<%gep.src> = getelementptr inbounds ir<%src>, vp<[[STEPS]]>
23-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep.src>
23+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep.src>
2424
; CHECK-NEXT: WIDEN ir<%l> = load vp<[[VEC_PTR]]>
2525
; CHECK-NEXT: WIDEN-CAST ir<%conv> = fpext ir<%l> to double
2626
; CHECK-NEXT: WIDEN-CALL ir<%s> = call @llvm.sin.f64(ir<%conv>) (using library function: __simd_sin_v2f64)
@@ -49,7 +49,7 @@ target triple = "arm64-apple-ios"
4949
; CHECK-NEXT: EMIT vp<[[CAN_IV:%.+]]> = CANONICAL-INDUCTION
5050
; CHECK-NEXT: vp<[[STEPS:%.+]]> = SCALAR-STEPS vp<[[CAN_IV]]>, ir<1>
5151
; CHECK-NEXT: CLONE ir<%gep.src> = getelementptr inbounds ir<%src>, vp<[[STEPS]]>
52-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep.src>
52+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%gep.src>
5353
; CHECK-NEXT: WIDEN ir<%l> = load vp<[[VEC_PTR]]>
5454
; CHECK-NEXT: WIDEN-CAST ir<%conv> = fpext ir<%l> to double
5555
; CHECK-NEXT: WIDEN-CALL ir<%s> = call @llvm.sin.f64(ir<%conv>) (using vector intrinsic)

llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ define void @vector_reverse_i64(ptr nocapture noundef writeonly %A, ptr nocaptur
6767
; CHECK-NEXT: CLONE ir<%i.0> = add nsw vp<[[STEPS]]>, ir<-1>
6868
; CHECK-NEXT: CLONE ir<%idxprom> = zext ir<%i.0>
6969
; CHECK-NEXT: CLONE ir<%arrayidx> = getelementptr inbounds ir<%B>, ir<%idxprom>
70-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer-reverse ir<%arrayidx>
70+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer (reverse) ir<%arrayidx>
7171
; CHECK-NEXT: WIDEN ir<%1> = load vp<[[VEC_PTR]]>
7272
; CHECK-NEXT: WIDEN ir<%add9> = add ir<%1>, ir<1>
7373
; CHECK-NEXT: CLONE ir<%arrayidx3> = getelementptr inbounds ir<%A>, ir<%idxprom>
74-
; CHECK-NEXT: EMIT vp<[[VEC_PTR2:%.+]]> = vector-pointer-reverse ir<%arrayidx3>
74+
; CHECK-NEXT: vp<[[VEC_PTR2:%.+]]> = vector-pointer (reverse) ir<%arrayidx3>
7575
; CHECK-NEXT: WIDEN store vp<[[VEC_PTR2]]>, ir<%add9>
7676
; CHECK-NEXT: EMIT vp<[[IV_INC:%.+]]> = add nuw vp<[[CAN_IV]]>, vp<[[VFxUF]]>
7777
; CHECK-NEXT: EMIT branch-on-count vp<[[IV_INC]]>, vp<[[VEC_TC]]>
@@ -207,11 +207,11 @@ define void @vector_reverse_f32(ptr nocapture noundef writeonly %A, ptr nocaptur
207207
; CHECK-NEXT: CLONE ir<%i.0> = add nsw vp<[[STEPS]]>, ir<-1>
208208
; CHECK-NEXT: CLONE ir<%idxprom> = zext ir<%i.0>
209209
; CHECK-NEXT: CLONE ir<%arrayidx> = getelementptr inbounds ir<%B>, ir<%idxprom>
210-
; CHECK-NEXT: EMIT vp<[[VEC_PTR:%.+]]> = vector-pointer-reverse ir<%arrayidx>
210+
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer (reverse) ir<%arrayidx>
211211
; CHECK-NEXT: WIDEN ir<%1> = load vp<[[VEC_PTR]]>
212212
; CHECK-NEXT: WIDEN ir<%conv1> = fadd ir<%1>, ir<1.000000e+00>
213213
; CHECK-NEXT: CLONE ir<%arrayidx3> = getelementptr inbounds ir<%A>, ir<%idxprom>
214-
; CHECK-NEXT: EMIT vp<[[VEC_PTR2:%.+]]> = vector-pointer-reverse ir<%arrayidx3>
214+
; CHECK-NEXT: vp<[[VEC_PTR2:%.+]]> = vector-pointer (reverse) ir<%arrayidx3>
215215
; CHECK-NEXT: WIDEN store vp<[[VEC_PTR2]]>, ir<%conv1>
216216
; CHECK-NEXT: EMIT vp<[[IV_INC:%.+]]> = add nuw vp<[[CAN_IV]]>, vp<[[VFxUF]]>
217217
; CHECK-NEXT: EMIT branch-on-count vp<[[IV_INC]]>, vp<[[VEC_TC]]>

0 commit comments

Comments
 (0)