Skip to content

Commit 3b221c6

Browse files
committed
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFC
1 parent 4b8bc6b commit 3b221c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3181,7 +3181,7 @@ bool LoongArchTargetLowering::decomposeMulByConstant(LLVMContext &Context,
31813181
return false;
31823182
// We do not consider the case `(-Imm - ImmSmall).isPowerOf2()`,
31833183
// since it needs one more instruction than other 3 cases.
3184-
APInt ImmSmall = APInt(Imm.getBitWidth(), 1 << Shifts, true);
3184+
APInt ImmSmall = APInt(Imm.getBitWidth(), 1ULL << Shifts, true);
31853185
if ((Imm - ImmSmall).isPowerOf2() || (Imm + ImmSmall).isPowerOf2() ||
31863186
(ImmSmall - Imm).isPowerOf2())
31873187
return true;

0 commit comments

Comments
 (0)