Skip to content

Commit f952a84

Browse files
committed
[TargetLowering] Use getShiftAmountConstant in buildSDIVPow2WithCMov.
1 parent 7598c25 commit f952a84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6482,8 +6482,8 @@ SDValue TargetLowering::buildSDIVPow2WithCMov(
64826482
Created.push_back(CMov.getNode());
64836483

64846484
// Divide by pow2.
6485-
SDValue SRA =
6486-
DAG.getNode(ISD::SRA, DL, VT, CMov, DAG.getConstant(Lg2, DL, VT));
6485+
SDValue SRA = DAG.getNode(ISD::SRA, DL, VT, CMov,
6486+
DAG.getShiftAmountConstant(Lg2, VT, DL));
64876487

64886488
// If we're dividing by a positive value, we're done. Otherwise, we must
64896489
// negate the result.

0 commit comments

Comments
 (0)