We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8aeb104 commit 7e07c1dCopy full SHA for 7e07c1d
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -9557,13 +9557,13 @@ SDValue TargetLowering::expandAVG(SDNode *N, SelectionDAG &DAG) const {
9557
SDValue Overflow = UAddWithOverflow.getValue(1);
9558
9559
// Right shift the sum by 1
9560
- SDValue One = DAG.getShiftAmountConstant(1, VT, dl);
9561
- SDValue LShrVal = DAG.getNode(ISD::SRL, dl, VT, Sum, One);
+ SDValue LShrVal = DAG.getNode(ISD::SRL, dl, VT, Sum,
+ DAG.getShiftAmountConstant(1, VT, dl));
9562
9563
SDValue ZeroExtOverflow = DAG.getNode(ISD::ANY_EXTEND, dl, VT, Overflow);
9564
- SDValue OverflowShl =
9565
- DAG.getNode(ISD::SHL, dl, VT, ZeroExtOverflow,
9566
- DAG.getConstant(VT.getScalarSizeInBits() - 1, dl, VT));
+ SDValue OverflowShl = DAG.getNode(
+ ISD::SHL, dl, VT, ZeroExtOverflow,
+ DAG.getShiftAmountConstant(VT.getScalarSizeInBits() - 1, VT, dl));
9567
9568
return DAG.getNode(ISD::OR, dl, VT, LShrVal, OverflowShl);
9569
}
0 commit comments