@@ -2626,6 +2626,7 @@ class VPExtendedReductionRecipe : public VPReductionRecipe {
2626
2626
ExtRed->isOrdered(), ExtRed->getDebugLoc()),
2627
2627
ExtOp(ExtRed->getExtOpcode ()), ResultTy(ExtRed->getResultType ()) {
2628
2628
transferFlags (*ExtRed);
2629
+ setUnderlyingValue (ExtRed->getUnderlyingValue ());
2629
2630
}
2630
2631
2631
2632
public:
@@ -2671,11 +2672,11 @@ class VPExtendedReductionRecipe : public VPReductionRecipe {
2671
2672
Instruction::CastOps getExtOpcode () const { return ExtOp; }
2672
2673
};
2673
2674
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]}.
2679
2680
class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
2680
2681
// / Opcode of the extend for VecOp1 and VecOp2.
2681
2682
Instruction::CastOps ExtOp;
@@ -2695,7 +2696,10 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
2695
2696
WrapFlagsTy(MulAcc->hasNoUnsignedWrap (), MulAcc->hasNoSignedWrap()),
2696
2697
MulAcc->getDebugLoc()),
2697
2698
ExtOp(MulAcc->getExtOpcode ()), IsNonNeg(MulAcc->isNonNeg ()),
2698
- ResultTy(MulAcc->getResultType ()) {}
2699
+ ResultTy(MulAcc->getResultType ()) {
2700
+ transferFlags (*MulAcc);
2701
+ setUnderlyingValue (MulAcc->getUnderlyingValue ());
2702
+ }
2699
2703
2700
2704
public:
2701
2705
VPMulAccumulateReductionRecipe (VPReductionRecipe *R, VPWidenRecipe *Mul,
@@ -2740,9 +2744,7 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
2740
2744
~VPMulAccumulateReductionRecipe () override = default ;
2741
2745
2742
2746
VPMulAccumulateReductionRecipe *clone () override {
2743
- auto *Copy = new VPMulAccumulateReductionRecipe (this );
2744
- Copy->transferFlags (*this );
2745
- return Copy;
2747
+ return new VPMulAccumulateReductionRecipe (this );
2746
2748
}
2747
2749
2748
2750
VP_CLASSOF_IMPL (VPDef::VPMulAccumulateReductionSC);
0 commit comments