Skip to content

Commit 42c2057

Browse files
committed
use getFixedValue() from size directly
1 parent 441f132 commit 42c2057

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,7 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
318318

319319
OpdsMapping[1] = GPRValueMapping;
320320
// Use FPR64 for s64 loads on rv32.
321-
if (!Ty.isVector() && GPRSize == 32 &&
322-
Ty.getSizeInBits().getFixedValue() == 64) {
321+
if (!Ty.isVector() && GPRSize == 32 && Size.getFixedValue() == 64) {
323322
assert(MF.getSubtarget<RISCVSubtarget>().hasStdExtD());
324323
OpdsMapping[0] = getFPValueMapping(Ty.getSizeInBits());
325324
break;
@@ -347,8 +346,7 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
347346

348347
OpdsMapping[1] = GPRValueMapping;
349348
// Use FPR64 for s64 stores on rv32.
350-
if (!Ty.isVector() && GPRSize == 32 &&
351-
Ty.getSizeInBits().getFixedValue() == 64) {
349+
if (!Ty.isVector() && GPRSize == 32 && Size.getFixedValue() == 64) {
352350
assert(MF.getSubtarget<RISCVSubtarget>().hasStdExtD());
353351
OpdsMapping[0] = getFPValueMapping(Ty.getSizeInBits());
354352
break;

0 commit comments

Comments
 (0)