@@ -2706,7 +2706,8 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
2706
2706
WrapFlagsTy(MulAcc->hasNoUnsignedWrap (), MulAcc->hasNoSignedWrap()),
2707
2707
MulAcc->getDebugLoc()),
2708
2708
ResultTy(MulAcc->getResultType ()),
2709
- VFScaleFactor(MulAcc->getVFScaleFactor ()) {
2709
+ VFScaleFactor(MulAcc->getVFScaleFactor ()),
2710
+ VecOpInfo{MulAcc->getVecOp0Info (), MulAcc->getVecOp1Info ()} {
2710
2711
transferFlags (*MulAcc);
2711
2712
setUnderlyingValue (MulAcc->getUnderlyingValue ());
2712
2713
VecOpInfo[0 ] = MulAcc->getVecOp0Info ();
@@ -2724,17 +2725,15 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
2724
2725
R->getCondOp (), R->isOrdered(),
2725
2726
WrapFlagsTy(Mul->hasNoUnsignedWrap (), Mul->hasNoSignedWrap()),
2726
2727
R->getDebugLoc()),
2727
- ResultTy(ResultTy), VFScaleFactor(ScaleFactor) {
2728
+ ResultTy(ResultTy), VFScaleFactor(ScaleFactor),
2729
+ VecOpInfo{
2730
+ {Ext0->getOpcode (), Ext0->hasNonNegFlag () && Ext0->isNonNeg ()},
2731
+ {Ext1->getOpcode (), Ext1->hasNonNegFlag () && Ext1->isNonNeg ()}} {
2728
2732
assert (RecurrenceDescriptor::getOpcode (getRecurrenceKind ()) ==
2729
2733
Instruction::Add &&
2730
2734
" The reduction instruction in MulAccumulateteReductionRecipe must "
2731
2735
" be Add" );
2732
2736
setUnderlyingValue (R->getUnderlyingValue ());
2733
- // Only set the non-negative flag if the original recipe contains one.
2734
- VecOpInfo[0 ] = {Ext0->getOpcode (),
2735
- Ext0->hasNonNegFlag () && Ext0->isNonNeg ()};
2736
- VecOpInfo[1 ] = {Ext1->getOpcode (),
2737
- Ext1->hasNonNegFlag () && Ext1->isNonNeg ()};
2738
2737
assert (((Ext0->getOpcode () == Instruction::CastOps::ZExt ||
2739
2738
Ext0->getOpcode () == Instruction::CastOps::SExt) &&
2740
2739
(Ext1->getOpcode () == Instruction::CastOps::ZExt ||
@@ -2809,8 +2808,8 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
2809
2808
// / output
2810
2809
unsigned getVFScaleFactor () const { return VFScaleFactor; }
2811
2810
2812
- VecOperandInfo getVecOp0Info () const { return VecOpInfo[0 ]; }
2813
- VecOperandInfo getVecOp1Info () const { return VecOpInfo[1 ]; }
2811
+ const VecOperandInfo & getVecOp0Info () const { return VecOpInfo[0 ]; }
2812
+ const VecOperandInfo & getVecOp1Info () const { return VecOpInfo[1 ]; }
2814
2813
2815
2814
protected:
2816
2815
VecOperandInfo VecOpInfo[2 ];
0 commit comments