Skip to content

Commit

Permalink
[RISCV] Use uint64_t operations instead of APInt operations. NFC
Browse files Browse the repository at this point in the history
We already know the type is i64 here. Just extract the uint64_t.
  • Loading branch information
topperc committed Aug 5, 2024
1 parent ca40989 commit dac9042
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15515,7 +15515,7 @@ static SDValue performSRACombine(SDNode *N, SelectionDAG &DAG,
return SDValue();

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

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

0 comments on commit dac9042

Please sign in to comment.