Skip to content

Commit 8a0699c

Browse files
committed
[VPlan] Only store RecurKind + FastMathFlags in VPReductionRecipe. NFCI
VPReductionRecipes take a RecurrenceDescriptor, but only use the RecurKind and FastMathFlags in it when executing. This patch makes the recipe more lightweight by stripping it to only take the latter, which allows it inherit from VPRecipeWithIRFlags. This also allows us to remove createReduction in LoopUtils since it now only has one user in VPInstruction::ComputeReductionResult. The motiviation for this is to simplify an upcoming patch to support in-loop AnyOf reductions. For an in-loop AnyOf reduction we want to create an Or reduction, and by using RecurKind we can create an arbitrary reduction without needing a full RecurrenceDescriptor.
1 parent fc8b2bf commit 8a0699c

File tree

5 files changed

+77
-94
lines changed

5 files changed

+77
-94
lines changed

llvm/include/llvm/Transforms/Utils/LoopUtils.h

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ Value *createSimpleReduction(IRBuilderBase &B, Value *Src,
411411
RecurKind RdxKind);
412412
/// Overloaded function to generate vector-predication intrinsics for
413413
/// reduction.
414-
Value *createSimpleReduction(VectorBuilder &VB, Value *Src,
415-
const RecurrenceDescriptor &Desc);
414+
Value *createSimpleReduction(VectorBuilder &VB, Value *Src, RecurKind RdxKind,
415+
FastMathFlags FMFs);
416416

417417
/// Create a reduction of the given vector \p Src for a reduction of the
418418
/// kind RecurKind::IAnyOf or RecurKind::FAnyOf. The reduction operation is
@@ -427,20 +427,13 @@ Value *createAnyOfReduction(IRBuilderBase &B, Value *Src,
427427
Value *createFindLastIVReduction(IRBuilderBase &B, Value *Src,
428428
const RecurrenceDescriptor &Desc);
429429

430-
/// Create a generic reduction using a recurrence descriptor \p Desc
431-
/// Fast-math-flags are propagated using the RecurrenceDescriptor.
432-
Value *createReduction(IRBuilderBase &B, const RecurrenceDescriptor &Desc,
433-
Value *Src, PHINode *OrigPhi = nullptr);
434-
435430
/// Create an ordered reduction intrinsic using the given recurrence
436-
/// descriptor \p Desc.
437-
Value *createOrderedReduction(IRBuilderBase &B,
438-
const RecurrenceDescriptor &Desc, Value *Src,
431+
/// kind \p Kind.
432+
Value *createOrderedReduction(IRBuilderBase &B, RecurKind Kind, Value *Src,
439433
Value *Start);
440434
/// Overloaded function to generate vector-predication intrinsics for ordered
441435
/// reduction.
442-
Value *createOrderedReduction(VectorBuilder &VB,
443-
const RecurrenceDescriptor &Desc, Value *Src,
436+
Value *createOrderedReduction(VectorBuilder &VB, RecurKind Kind, Value *Src,
444437
Value *Start);
445438

446439
/// Get the intersection (logical and) of all of the potential IR flags

llvm/lib/Transforms/Utils/LoopUtils.cpp

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,53 +1333,30 @@ Value *llvm::createSimpleReduction(IRBuilderBase &Builder, Value *Src,
13331333
}
13341334

13351335
Value *llvm::createSimpleReduction(VectorBuilder &VBuilder, Value *Src,
1336-
const RecurrenceDescriptor &Desc) {
1337-
RecurKind Kind = Desc.getRecurrenceKind();
1336+
RecurKind Kind, FastMathFlags FMFs) {
13381337
assert(!RecurrenceDescriptor::isAnyOfRecurrenceKind(Kind) &&
13391338
"AnyOf reduction is not supported.");
13401339
Intrinsic::ID Id = getReductionIntrinsicID(Kind);
13411340
auto *SrcTy = cast<VectorType>(Src->getType());
13421341
Type *SrcEltTy = SrcTy->getElementType();
1343-
Value *Iden = getRecurrenceIdentity(Kind, SrcEltTy, Desc.getFastMathFlags());
1342+
Value *Iden = getRecurrenceIdentity(Kind, SrcEltTy, FMFs);
13441343
Value *Ops[] = {Iden, Src};
13451344
return VBuilder.createSimpleReduction(Id, SrcTy, Ops);
13461345
}
13471346

1348-
Value *llvm::createReduction(IRBuilderBase &B,
1349-
const RecurrenceDescriptor &Desc, Value *Src,
1350-
PHINode *OrigPhi) {
1351-
// TODO: Support in-order reductions based on the recurrence descriptor.
1352-
// All ops in the reduction inherit fast-math-flags from the recurrence
1353-
// descriptor.
1354-
IRBuilderBase::FastMathFlagGuard FMFGuard(B);
1355-
B.setFastMathFlags(Desc.getFastMathFlags());
1356-
1357-
RecurKind RK = Desc.getRecurrenceKind();
1358-
if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RK))
1359-
return createAnyOfReduction(B, Src, Desc, OrigPhi);
1360-
if (RecurrenceDescriptor::isFindLastIVRecurrenceKind(RK))
1361-
return createFindLastIVReduction(B, Src, Desc);
1362-
1363-
return createSimpleReduction(B, Src, RK);
1364-
}
1365-
1366-
Value *llvm::createOrderedReduction(IRBuilderBase &B,
1367-
const RecurrenceDescriptor &Desc,
1347+
Value *llvm::createOrderedReduction(IRBuilderBase &B, RecurKind Kind,
13681348
Value *Src, Value *Start) {
1369-
assert((Desc.getRecurrenceKind() == RecurKind::FAdd ||
1370-
Desc.getRecurrenceKind() == RecurKind::FMulAdd) &&
1349+
assert((Kind == RecurKind::FAdd || Kind == RecurKind::FMulAdd) &&
13711350
"Unexpected reduction kind");
13721351
assert(Src->getType()->isVectorTy() && "Expected a vector type");
13731352
assert(!Start->getType()->isVectorTy() && "Expected a scalar type");
13741353

13751354
return B.CreateFAddReduce(Start, Src);
13761355
}
13771356

1378-
Value *llvm::createOrderedReduction(VectorBuilder &VBuilder,
1379-
const RecurrenceDescriptor &Desc,
1357+
Value *llvm::createOrderedReduction(VectorBuilder &VBuilder, RecurKind Kind,
13801358
Value *Src, Value *Start) {
1381-
assert((Desc.getRecurrenceKind() == RecurKind::FAdd ||
1382-
Desc.getRecurrenceKind() == RecurKind::FMulAdd) &&
1359+
assert((Kind == RecurKind::FAdd || Kind == RecurKind::FMulAdd) &&
13831360
"Unexpected reduction kind");
13841361
assert(Src->getType()->isVectorTy() && "Expected a vector type");
13851362
assert(!Start->getType()->isVectorTy() && "Expected a scalar type");

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,39 +2237,47 @@ class VPInterleaveRecipe : public VPRecipeBase {
22372237
/// A recipe to represent inloop reduction operations, performing a reduction on
22382238
/// a vector operand into a scalar value, and adding the result to a chain.
22392239
/// The Operands are {ChainOp, VecOp, [Condition]}.
2240-
class VPReductionRecipe : public VPSingleDefRecipe {
2240+
class VPReductionRecipe : public VPRecipeWithIRFlags {
22412241
/// The recurrence decriptor for the reduction in question.
2242-
const RecurrenceDescriptor &RdxDesc;
2242+
RecurKind RdxKind;
22432243
bool IsOrdered;
22442244
/// Whether the reduction is conditional.
22452245
bool IsConditional = false;
22462246

22472247
protected:
2248-
VPReductionRecipe(const unsigned char SC, const RecurrenceDescriptor &R,
2249-
Instruction *I, ArrayRef<VPValue *> Operands,
2250-
VPValue *CondOp, bool IsOrdered, DebugLoc DL)
2251-
: VPSingleDefRecipe(SC, Operands, I, DL), RdxDesc(R),
2248+
VPReductionRecipe(const unsigned char SC, RecurKind RdxKind,
2249+
FastMathFlags FMFs, Instruction *I,
2250+
ArrayRef<VPValue *> Operands, VPValue *CondOp,
2251+
bool IsOrdered, DebugLoc DL)
2252+
: VPRecipeWithIRFlags(SC, Operands, FMFs, DL), RdxKind(RdxKind),
22522253
IsOrdered(IsOrdered) {
2254+
setUnderlyingValue(I);
22532255
if (CondOp) {
22542256
IsConditional = true;
22552257
addOperand(CondOp);
22562258
}
22572259
}
22582260

22592261
public:
2260-
VPReductionRecipe(const RecurrenceDescriptor &R, Instruction *I,
2262+
VPReductionRecipe(RecurKind RdxKind, FastMathFlags FMFs, Instruction *I,
22612263
VPValue *ChainOp, VPValue *VecOp, VPValue *CondOp,
22622264
bool IsOrdered, DebugLoc DL = {})
2263-
: VPReductionRecipe(VPDef::VPReductionSC, R, I,
2265+
: VPReductionRecipe(VPRecipeBase::VPReductionSC, RdxKind, FMFs, I,
22642266
ArrayRef<VPValue *>({ChainOp, VecOp}), CondOp,
22652267
IsOrdered, DL) {}
22662268

2269+
VPReductionRecipe(const RecurrenceDescriptor &R, Instruction *I,
2270+
VPValue *ChainOp, VPValue *VecOp, VPValue *CondOp,
2271+
bool IsOrdered, DebugLoc DL = {})
2272+
: VPReductionRecipe(R.getRecurrenceKind(), R.getFastMathFlags(), I,
2273+
ChainOp, VecOp, CondOp, IsOrdered, DL) {}
2274+
22672275
~VPReductionRecipe() override = default;
22682276

22692277
VPReductionRecipe *clone() override {
2270-
return new VPReductionRecipe(RdxDesc, getUnderlyingInstr(), getChainOp(),
2271-
getVecOp(), getCondOp(), IsOrdered,
2272-
getDebugLoc());
2278+
return new VPReductionRecipe(RdxKind, getFastMathFlags(),
2279+
getUnderlyingInstr(), getChainOp(), getVecOp(),
2280+
getCondOp(), IsOrdered, getDebugLoc());
22732281
}
22742282

22752283
static inline bool classof(const VPRecipeBase *R) {
@@ -2295,9 +2303,11 @@ class VPReductionRecipe : public VPSingleDefRecipe {
22952303
VPSlotTracker &SlotTracker) const override;
22962304
#endif
22972305

2298-
/// Return the recurrence decriptor for the in-loop reduction.
2299-
const RecurrenceDescriptor &getRecurrenceDescriptor() const {
2300-
return RdxDesc;
2306+
/// Return the recurrence kind for the in-loop reduction.
2307+
RecurKind getRecurrenceKind() const { return RdxKind; }
2308+
/// Return the opcode for the recurrence for the in-loop reduction.
2309+
unsigned getOpcode() const {
2310+
return RecurrenceDescriptor::getOpcode(RdxKind);
23012311
}
23022312
/// Return true if the in-loop reduction is ordered.
23032313
bool isOrdered() const { return IsOrdered; };
@@ -2321,7 +2331,8 @@ class VPReductionEVLRecipe : public VPReductionRecipe {
23212331
public:
23222332
VPReductionEVLRecipe(VPReductionRecipe &R, VPValue &EVL, VPValue *CondOp)
23232333
: VPReductionRecipe(
2324-
VPDef::VPReductionEVLSC, R.getRecurrenceDescriptor(),
2334+
VPDef::VPReductionEVLSC, R.getRecurrenceKind(),
2335+
R.getFastMathFlags(),
23252336
cast_or_null<Instruction>(R.getUnderlyingValue()),
23262337
ArrayRef<VPValue *>({R.getChainOp(), R.getVecOp(), &EVL}), CondOp,
23272338
R.isOrdered(), R.getDebugLoc()) {}

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,17 @@ Value *VPInstruction::generate(VPTransformState &State) {
666666
RecurrenceDescriptor::isAnyOfRecurrenceKind(RK) ||
667667
RecurrenceDescriptor::isFindLastIVRecurrenceKind(RK)) &&
668668
!PhiR->isInLoop()) {
669-
ReducedPartRdx =
670-
createReduction(Builder, RdxDesc, ReducedPartRdx, OrigPhi);
669+
IRBuilderBase::FastMathFlagGuard FMFG(Builder);
670+
Builder.setFastMathFlags(RdxDesc.getFastMathFlags());
671+
if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RK))
672+
ReducedPartRdx =
673+
createAnyOfReduction(Builder, ReducedPartRdx, RdxDesc, OrigPhi);
674+
else if (RecurrenceDescriptor::isFindLastIVRecurrenceKind(RK))
675+
ReducedPartRdx =
676+
createFindLastIVReduction(Builder, ReducedPartRdx, RdxDesc);
677+
else
678+
ReducedPartRdx = createSimpleReduction(Builder, ReducedPartRdx, RK);
679+
671680
// If the reduction can be performed in a smaller type, we need to extend
672681
// the reduction to the wider type before we branch to the original loop.
673682
if (PhiTy != RdxDesc.getRecurrenceType())
@@ -2263,21 +2272,21 @@ void VPBlendRecipe::print(raw_ostream &O, const Twine &Indent,
22632272
void VPReductionRecipe::execute(VPTransformState &State) {
22642273
assert(!State.Lane && "Reduction being replicated.");
22652274
Value *PrevInChain = State.get(getChainOp(), /*IsScalar*/ true);
2266-
RecurKind Kind = RdxDesc.getRecurrenceKind();
2275+
RecurKind Kind = getRecurrenceKind();
22672276
assert(!RecurrenceDescriptor::isAnyOfRecurrenceKind(Kind) &&
22682277
"In-loop AnyOf reductions aren't currently supported");
2278+
22692279
// Propagate the fast-math flags carried by the underlying instruction.
22702280
IRBuilderBase::FastMathFlagGuard FMFGuard(State.Builder);
2271-
State.Builder.setFastMathFlags(RdxDesc.getFastMathFlags());
2281+
State.Builder.setFastMathFlags(getFastMathFlags());
22722282
State.setDebugLocFrom(getDebugLoc());
22732283
Value *NewVecOp = State.get(getVecOp());
22742284
if (VPValue *Cond = getCondOp()) {
22752285
Value *NewCond = State.get(Cond, State.VF.isScalar());
22762286
VectorType *VecTy = dyn_cast<VectorType>(NewVecOp->getType());
22772287
Type *ElementTy = VecTy ? VecTy->getElementType() : NewVecOp->getType();
22782288

2279-
Value *Start =
2280-
getRecurrenceIdentity(Kind, ElementTy, RdxDesc.getFastMathFlags());
2289+
Value *Start = getRecurrenceIdentity(Kind, ElementTy, getFastMathFlags());
22812290
if (State.VF.isVector())
22822291
Start = State.Builder.CreateVectorSplat(VecTy->getElementCount(), Start);
22832292

@@ -2289,21 +2298,20 @@ void VPReductionRecipe::execute(VPTransformState &State) {
22892298
if (IsOrdered) {
22902299
if (State.VF.isVector())
22912300
NewRed =
2292-
createOrderedReduction(State.Builder, RdxDesc, NewVecOp, PrevInChain);
2301+
createOrderedReduction(State.Builder, Kind, NewVecOp, PrevInChain);
22932302
else
2294-
NewRed = State.Builder.CreateBinOp(
2295-
(Instruction::BinaryOps)RdxDesc.getOpcode(), PrevInChain, NewVecOp);
2303+
NewRed = State.Builder.CreateBinOp((Instruction::BinaryOps)getOpcode(),
2304+
PrevInChain, NewVecOp);
22962305
PrevInChain = NewRed;
22972306
NextInChain = NewRed;
22982307
} else {
22992308
PrevInChain = State.get(getChainOp(), /*IsScalar*/ true);
2300-
NewRed = createReduction(State.Builder, RdxDesc, NewVecOp);
2309+
NewRed = createSimpleReduction(State.Builder, NewVecOp, Kind);
23012310
if (RecurrenceDescriptor::isMinMaxRecurrenceKind(Kind))
2302-
NextInChain = createMinMaxOp(State.Builder, RdxDesc.getRecurrenceKind(),
2303-
NewRed, PrevInChain);
2311+
NextInChain = createMinMaxOp(State.Builder, Kind, NewRed, PrevInChain);
23042312
else
23052313
NextInChain = State.Builder.CreateBinOp(
2306-
(Instruction::BinaryOps)RdxDesc.getOpcode(), NewRed, PrevInChain);
2314+
(Instruction::BinaryOps)getOpcode(), NewRed, PrevInChain);
23072315
}
23082316
State.set(this, NextInChain, /*IsScalar*/ true);
23092317
}
@@ -2314,10 +2322,9 @@ void VPReductionEVLRecipe::execute(VPTransformState &State) {
23142322
auto &Builder = State.Builder;
23152323
// Propagate the fast-math flags carried by the underlying instruction.
23162324
IRBuilderBase::FastMathFlagGuard FMFGuard(Builder);
2317-
const RecurrenceDescriptor &RdxDesc = getRecurrenceDescriptor();
2318-
Builder.setFastMathFlags(RdxDesc.getFastMathFlags());
2325+
Builder.setFastMathFlags(getFastMathFlags());
23192326

2320-
RecurKind Kind = RdxDesc.getRecurrenceKind();
2327+
RecurKind Kind = getRecurrenceKind();
23212328
Value *Prev = State.get(getChainOp(), /*IsScalar*/ true);
23222329
Value *VecOp = State.get(getVecOp());
23232330
Value *EVL = State.get(getEVL(), VPLane(0));
@@ -2334,24 +2341,23 @@ void VPReductionEVLRecipe::execute(VPTransformState &State) {
23342341

23352342
Value *NewRed;
23362343
if (isOrdered()) {
2337-
NewRed = createOrderedReduction(VBuilder, RdxDesc, VecOp, Prev);
2344+
NewRed = createOrderedReduction(VBuilder, Kind, VecOp, Prev);
23382345
} else {
2339-
NewRed = createSimpleReduction(VBuilder, VecOp, RdxDesc);
2346+
NewRed = createSimpleReduction(VBuilder, VecOp, Kind, getFastMathFlags());
23402347
if (RecurrenceDescriptor::isMinMaxRecurrenceKind(Kind))
23412348
NewRed = createMinMaxOp(Builder, Kind, NewRed, Prev);
23422349
else
2343-
NewRed = Builder.CreateBinOp((Instruction::BinaryOps)RdxDesc.getOpcode(),
2344-
NewRed, Prev);
2350+
NewRed = Builder.CreateBinOp((Instruction::BinaryOps)getOpcode(), NewRed,
2351+
Prev);
23452352
}
23462353
State.set(this, NewRed, /*IsScalar*/ true);
23472354
}
23482355

23492356
InstructionCost VPReductionRecipe::computeCost(ElementCount VF,
23502357
VPCostContext &Ctx) const {
2351-
RecurKind RdxKind = RdxDesc.getRecurrenceKind();
2358+
RecurKind RdxKind = getRecurrenceKind();
23522359
Type *ElementTy = Ctx.Types.inferScalarType(this);
23532360
auto *VectorTy = cast<VectorType>(toVectorTy(ElementTy, VF));
2354-
unsigned Opcode = RdxDesc.getOpcode();
23552361

23562362
// TODO: Support any-of and in-loop reductions.
23572363
assert(
@@ -2363,20 +2369,17 @@ InstructionCost VPReductionRecipe::computeCost(ElementCount VF,
23632369
ForceTargetInstructionCost.getNumOccurrences() > 0) &&
23642370
"In-loop reduction not implemented in VPlan-based cost model currently.");
23652371

2366-
assert(ElementTy->getTypeID() == RdxDesc.getRecurrenceType()->getTypeID() &&
2367-
"Inferred type and recurrence type mismatch.");
2368-
23692372
// Cost = Reduction cost + BinOp cost
23702373
InstructionCost Cost =
2371-
Ctx.TTI.getArithmeticInstrCost(Opcode, ElementTy, Ctx.CostKind);
2374+
Ctx.TTI.getArithmeticInstrCost(getOpcode(), ElementTy, Ctx.CostKind);
23722375
if (RecurrenceDescriptor::isMinMaxRecurrenceKind(RdxKind)) {
23732376
Intrinsic::ID Id = getMinMaxReductionIntrinsicOp(RdxKind);
23742377
return Cost + Ctx.TTI.getMinMaxReductionCost(
2375-
Id, VectorTy, RdxDesc.getFastMathFlags(), Ctx.CostKind);
2378+
Id, VectorTy, getFastMathFlags(), Ctx.CostKind);
23762379
}
23772380

23782381
return Cost + Ctx.TTI.getArithmeticReductionCost(
2379-
Opcode, VectorTy, RdxDesc.getFastMathFlags(), Ctx.CostKind);
2382+
getOpcode(), VectorTy, getFastMathFlags(), Ctx.CostKind);
23802383
}
23812384

23822385
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
@@ -2389,29 +2392,31 @@ void VPReductionRecipe::print(raw_ostream &O, const Twine &Indent,
23892392
O << " +";
23902393
if (isa<FPMathOperator>(getUnderlyingInstr()))
23912394
O << getUnderlyingInstr()->getFastMathFlags();
2392-
O << " reduce." << Instruction::getOpcodeName(RdxDesc.getOpcode()) << " (";
2395+
O << " reduce."
2396+
<< Instruction::getOpcodeName(
2397+
RecurrenceDescriptor::getOpcode(getRecurrenceKind()))
2398+
<< " (";
23932399
getVecOp()->printAsOperand(O, SlotTracker);
23942400
if (isConditional()) {
23952401
O << ", ";
23962402
getCondOp()->printAsOperand(O, SlotTracker);
23972403
}
23982404
O << ")";
2399-
if (RdxDesc.IntermediateStore)
2400-
O << " (with final reduction value stored in invariant address sank "
2401-
"outside of loop)";
24022405
}
24032406

24042407
void VPReductionEVLRecipe::print(raw_ostream &O, const Twine &Indent,
24052408
VPSlotTracker &SlotTracker) const {
2406-
const RecurrenceDescriptor &RdxDesc = getRecurrenceDescriptor();
2409+
RecurKind Kind = getRecurrenceKind();
24072410
O << Indent << "REDUCE ";
24082411
printAsOperand(O, SlotTracker);
24092412
O << " = ";
24102413
getChainOp()->printAsOperand(O, SlotTracker);
24112414
O << " +";
24122415
if (isa<FPMathOperator>(getUnderlyingInstr()))
24132416
O << getUnderlyingInstr()->getFastMathFlags();
2414-
O << " vp.reduce." << Instruction::getOpcodeName(RdxDesc.getOpcode()) << " (";
2417+
O << " vp.reduce."
2418+
<< Instruction::getOpcodeName(RecurrenceDescriptor::getOpcode(Kind))
2419+
<< " (";
24152420
getVecOp()->printAsOperand(O, SlotTracker);
24162421
O << ", ";
24172422
getEVL()->printAsOperand(O, SlotTracker);
@@ -2420,9 +2425,6 @@ void VPReductionEVLRecipe::print(raw_ostream &O, const Twine &Indent,
24202425
getCondOp()->printAsOperand(O, SlotTracker);
24212426
}
24222427
O << ")";
2423-
if (RdxDesc.IntermediateStore)
2424-
O << " (with final reduction value stored in invariant address sank "
2425-
"outside of loop)";
24262428
}
24272429
#endif
24282430

llvm/test/Transforms/LoopVectorize/vplan-printing.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ define void @print_reduction_with_invariant_store(i64 %n, ptr noalias %y, ptr no
234234
; CHECK-NEXT: CLONE ir<%arrayidx> = getelementptr inbounds ir<%y>, vp<[[IV]]>
235235
; CHECK-NEXT: vp<[[VEC_PTR:%.+]]> = vector-pointer ir<%arrayidx>
236236
; CHECK-NEXT: WIDEN ir<%lv> = load vp<[[VEC_PTR]]>
237-
; CHECK-NEXT: REDUCE ir<%red.next> = ir<%red> + fast reduce.fadd (ir<%lv>) (with final reduction value stored in invariant address sank outside of loop)
237+
; CHECK-NEXT: REDUCE ir<%red.next> = ir<%red> + fast reduce.fadd (ir<%lv>)
238238
; CHECK-NEXT: EMIT vp<[[CAN_IV_NEXT]]> = add nuw vp<[[CAN_IV]]>, vp<[[VFxUF]]>
239239
; CHECK-NEXT: EMIT branch-on-count vp<[[CAN_IV_NEXT]]>, vp<[[VTC]]>
240240
; CHECK-NEXT: No successors

0 commit comments

Comments
 (0)