Skip to content

Commit 6264041

Browse files
committed
[RISCV] Use isUInt<32> instead of <= 0xffffffff. NFC
1 parent 9fa23e4 commit 6264041

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16796,7 +16796,7 @@ static SDValue performSETCCCombine(SDNode *N,
1679616796
// addi or xori after shifting.
1679716797
uint64_t N1Int = cast<ConstantSDNode>(N1)->getZExtValue();
1679816798
uint64_t AndRHSInt = AndRHSC.getZExtValue();
16799-
if (OpVT == MVT::i64 && AndRHSInt <= 0xffffffff &&
16799+
if (OpVT == MVT::i64 && isUInt<32>(AndRHSInt) &&
1680016800
isPowerOf2_32(-uint32_t(AndRHSInt)) && (N1Int & AndRHSInt) == N1Int) {
1680116801
unsigned ShiftBits = llvm::countr_zero(AndRHSInt);
1680216802
int64_t NewC = SignExtend64<32>(N1Int) >> ShiftBits;

0 commit comments

Comments
 (0)