forked from OSchip/llvm-project
[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:
parent
d71a8bb157
commit
13d58ff9f3
|
@ -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));
|
||||
}]>;
|
||||
|
||||
|
|
Loading…
Reference in New Issue