[RISCV] Replace call to APInt::countTrailingZeros with uint64_t verson. NFC

We know the number of bits is 64 or 32 so we can use the uint64_t
version directly. This saves the APInt needing to check for the
small vs large size.
This commit is contained in:
Craig Topper 2022-07-03 08:57:51 -07:00
parent d71a8bb157
commit 13d58ff9f3
1 changed files with 2 additions and 2 deletions

View File

@ -83,13 +83,13 @@ def shfl_uimm : Operand<XLenVT>, ImmLeaf<XLenVT, [{
def BCLRXForm : SDNodeXForm<imm, [{
// Find the lowest 0.
return CurDAG->getTargetConstant(N->getAPIntValue().countTrailingOnes(),
return CurDAG->getTargetConstant(countTrailingOnes(N->getZExtValue()),
SDLoc(N), N->getValueType(0));
}]>;
def BSETINVXForm : SDNodeXForm<imm, [{
// Find the lowest 1.
return CurDAG->getTargetConstant(N->getAPIntValue().countTrailingZeros(),
return CurDAG->getTargetConstant(countTrailingZeros(N->getZExtValue()),
SDLoc(N), N->getValueType(0));
}]>;