@@ -2626,6 +2626,7 @@ class VPExtendedReductionRecipe : public VPReductionRecipe {
26262626 ExtRed->isOrdered(), ExtRed->getDebugLoc()),
26272627 ExtOp(ExtRed->getExtOpcode ()), ResultTy(ExtRed->getResultType ()) {
26282628 transferFlags (*ExtRed);
2629+ setUnderlyingValue (ExtRed->getUnderlyingValue ());
26292630 }
26302631
26312632public:
@@ -2671,11 +2672,11 @@ class VPExtendedReductionRecipe : public VPReductionRecipe {
26712672 Instruction::CastOps getExtOpcode () const { return ExtOp; }
26722673};
26732674
2674- // / A recipe to represent inloop MulAccumulateReduction operations, performing a
2675- // / reduction.add on the result of vector operands (might be extended)
2676- // / multiplication into a scalar value , and adding the result to a chain. This
2677- // / recipe is abstract and needs to be lowered to concrete recipes before
2678- // / codegen. The operands are {ChainOp, VecOp1, VecOp2, [Condition]}.
2675+ // / A recipe to represent inloop MulAccumulateReduction operations, multiplying
2676+ // / the vector operands (which may be extended), performing a reduction.add on
2677+ // / the result , and adding the scalar result to a chain. This recipe is abstract
2678+ // / and needs to be lowered to concrete recipes before codegen. The operands are
2679+ // / {ChainOp, VecOp1, VecOp2, [Condition]}.
26792680class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
26802681 // / Opcode of the extend for VecOp1 and VecOp2.
26812682 Instruction::CastOps ExtOp;
@@ -2695,7 +2696,10 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
26952696 WrapFlagsTy(MulAcc->hasNoUnsignedWrap (), MulAcc->hasNoSignedWrap()),
26962697 MulAcc->getDebugLoc()),
26972698 ExtOp(MulAcc->getExtOpcode ()), IsNonNeg(MulAcc->isNonNeg ()),
2698- ResultTy(MulAcc->getResultType ()) {}
2699+ ResultTy(MulAcc->getResultType ()) {
2700+ transferFlags (*MulAcc);
2701+ setUnderlyingValue (MulAcc->getUnderlyingValue ());
2702+ }
26992703
27002704public:
27012705 VPMulAccumulateReductionRecipe (VPReductionRecipe *R, VPWidenRecipe *Mul,
@@ -2740,9 +2744,7 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
27402744 ~VPMulAccumulateReductionRecipe () override = default ;
27412745
27422746 VPMulAccumulateReductionRecipe *clone () override {
2743- auto *Copy = new VPMulAccumulateReductionRecipe (this );
2744- Copy->transferFlags (*this );
2745- return Copy;
2747+ return new VPMulAccumulateReductionRecipe (this );
27462748 }
27472749
27482750 VP_CLASSOF_IMPL (VPDef::VPMulAccumulateReductionSC);
0 commit comments