diff options
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 2b41b8a..b3307dc 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -9557,13 +9557,13 @@ SDValue TargetLowering::expandAVG(SDNode *N, SelectionDAG &DAG) const { SDValue Overflow = UAddWithOverflow.getValue(1); // Right shift the sum by 1 - SDValue One = DAG.getShiftAmountConstant(1, VT, dl); - SDValue LShrVal = DAG.getNode(ISD::SRL, dl, VT, Sum, One); + SDValue LShrVal = DAG.getNode(ISD::SRL, dl, VT, Sum, + DAG.getShiftAmountConstant(1, VT, dl)); SDValue ZeroExtOverflow = DAG.getNode(ISD::ANY_EXTEND, dl, VT, Overflow); - SDValue OverflowShl = - DAG.getNode(ISD::SHL, dl, VT, ZeroExtOverflow, - DAG.getConstant(VT.getScalarSizeInBits() - 1, dl, VT)); + SDValue OverflowShl = DAG.getNode( + ISD::SHL, dl, VT, ZeroExtOverflow, + DAG.getShiftAmountConstant(VT.getScalarSizeInBits() - 1, VT, dl)); return DAG.getNode(ISD::OR, dl, VT, LShrVal, OverflowShl); } |