Skip to content

Commit 2a4a255

Browse files
committed
Fix -Wunused-variable warning in Release build.
1 parent c08b90c commit 2a4a255

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,7 @@ bool RISCVLegalizerInfo::legalizeVAStart(MachineInstr &MI,
462462

463463
bool RISCVLegalizerInfo::shouldBeInConstantPool(APInt APImm,
464464
bool ShouldOptForSize) const {
465-
unsigned BitWidth = APImm.getBitWidth();
466-
assert(BitWidth == 32 || BitWidth == 64);
465+
assert(APImm.getBitWidth() == 32 || APImm.getBitWidth() == 64);
467466
int64_t Imm = APImm.getSExtValue();
468467
// All simm32 constants should be handled by isel.
469468
// NOTE: The getMaxBuildIntsCost call below should return a value >= 2 making

0 commit comments

Comments
 (0)