@@ -2508,10 +2508,8 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
2508
2508
WrapFlagsTy(MulAcc->hasNoUnsignedWrap (), MulAcc->hasNoSignedWrap()),
2509
2509
MulAcc->getDebugLoc()),
2510
2510
ResultTy(MulAcc->getResultType ()),
2511
- IsPartialReduction(MulAcc->isPartialReduction ()) {
2512
- VecOpInfo[0 ] = MulAcc->getVecOp0Info ();
2513
- VecOpInfo[1 ] = MulAcc->getVecOp1Info ();
2514
- }
2511
+ IsPartialReduction(MulAcc->isPartialReduction ()),
2512
+ VecOpInfo{MulAcc->getVecOp0Info (), MulAcc->getVecOp1Info ()} {}
2515
2513
2516
2514
public:
2517
2515
VPMulAccumulateReductionRecipe (VPReductionRecipe *R, VPWidenRecipe *Mul,
@@ -2524,13 +2522,13 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
2524
2522
WrapFlagsTy(Mul->hasNoUnsignedWrap (), Mul->hasNoSignedWrap()),
2525
2523
R->getDebugLoc()),
2526
2524
ResultTy(ResultTy),
2527
- IsPartialReduction(isa<VPPartialReductionRecipe>(R)) {
2525
+ IsPartialReduction(isa<VPPartialReductionRecipe>(R)),
2526
+ VecOpInfo{{Ext0->getOpcode (), Ext0->isNonNeg ()},
2527
+ {Ext1->getOpcode (), Ext1->isNonNeg ()}} {
2528
2528
assert (RecurrenceDescriptor::getOpcode (getRecurrenceKind ()) ==
2529
2529
Instruction::Add &&
2530
2530
" The reduction instruction in MulAccumulateteReductionRecipe must "
2531
2531
" be Add" );
2532
- VecOpInfo[0 ] = {Ext0->getOpcode (), Ext0->isNonNeg ()};
2533
- VecOpInfo[1 ] = {Ext1->getOpcode (), Ext1->isNonNeg ()};
2534
2532
}
2535
2533
2536
2534
VPMulAccumulateReductionRecipe (VPReductionRecipe *R, VPWidenRecipe *Mul)
@@ -2597,8 +2595,8 @@ class VPMulAccumulateReductionRecipe : public VPReductionRecipe {
2597
2595
// / Return if the operands of mul instruction come from same extend.
2598
2596
bool isSameExtendVal () const { return getVecOp0 () == getVecOp1 (); }
2599
2597
2600
- VecOperandInfo getVecOp0Info () const { return VecOpInfo[0 ]; }
2601
- VecOperandInfo getVecOp1Info () const { return VecOpInfo[1 ]; }
2598
+ const VecOperandInfo & getVecOp0Info () const { return VecOpInfo[0 ]; }
2599
+ const VecOperandInfo & getVecOp1Info () const { return VecOpInfo[1 ]; }
2602
2600
2603
2601
// / Return if the underlying reduction recipe is a partial reduction.
2604
2602
bool isPartialReduction () const { return IsPartialReduction; }
0 commit comments