Skip to content

Commit dac9042

Browse files
committed
[RISCV] Use uint64_t operations instead of APInt operations. NFC
We already know the type is i64 here. Just extract the uint64_t.
1 parent ca40989 commit dac9042

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15515,7 +15515,7 @@ static SDValue performSRACombine(SDNode *N, SelectionDAG &DAG,
1551515515
return SDValue();
1551615516

1551715517
// AddC needs to have at least 32 trailing zeros.
15518-
if (AddC->getAPIntValue().countr_zero() < 32)
15518+
if (llvm::countr_zero(AddC->getZExtValue()) < 32)
1551915519
return SDValue();
1552015520

1552115521
// All users should be a shift by constant less than or equal to 32. This
@@ -15553,7 +15553,7 @@ static SDValue performSRACombine(SDNode *N, SelectionDAG &DAG,
1555315553
// constant.
1555415554
if (AddC) {
1555515555
SDValue ShiftedAddC =
15556-
DAG.getConstant(AddC->getAPIntValue().lshr(32), DL, MVT::i64);
15556+
DAG.getConstant(AddC->getZExtValue() >> 32, DL, MVT::i64);
1555715557
if (IsAdd)
1555815558
In = DAG.getNode(ISD::ADD, DL, MVT::i64, In, ShiftedAddC);
1555915559
else

0 commit comments

Comments
 (0)