Skip to content

Commit 06efdd7

Browse files
committed
made some changes based on review
1 parent 5bf908e commit 06efdd7

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -314,16 +314,13 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
314314
if (Ty.isVector()) {
315315
OpdsMapping[0] = getVRBValueMapping(Size.getKnownMinValue());
316316
OpdsMapping[1] = getVRBValueMapping(Size.getKnownMinValue());
317-
} else if (isPreISelGenericFloatingPointOpcode(Opc)) {
318-
OpdsMapping[0] = getFPValueMapping(Size.getFixedValue());
319-
OpdsMapping[1] = getFPValueMapping(Size.getFixedValue());
320317
} else {
321318
OpdsMapping[0] = GPRValueMapping;
322319
OpdsMapping[1] = GPRValueMapping;
323320
}
324321
// Use FPR64 for s64 loads on rv32.
325-
if (GPRSize == 32 && Ty.getSizeInBits().getKnownMinValue() == 64 &&
326-
!Ty.isVector()) {
322+
if (!Ty.isVector() && GPRSize == 32 &&
323+
Ty.getSizeInBits().getKnownMinValue() == 64) {
327324
assert(MF.getSubtarget<RISCVSubtarget>().hasStdExtD());
328325
OpdsMapping[0] = getFPValueMapping(Ty.getSizeInBits());
329326
break;
@@ -347,17 +344,14 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
347344
if (Ty.isVector()) {
348345
OpdsMapping[0] = getVRBValueMapping(Size.getKnownMinValue());
349346
OpdsMapping[1] = getVRBValueMapping(Size.getKnownMinValue());
350-
} else if (isPreISelGenericFloatingPointOpcode(Opc)) {
351-
OpdsMapping[0] = getFPValueMapping(Size.getFixedValue());
352-
OpdsMapping[1] = getFPValueMapping(Size.getFixedValue());
353347
} else {
354348
OpdsMapping[0] = GPRValueMapping;
355349
OpdsMapping[1] = GPRValueMapping;
356350
}
357351

358352
// Use FPR64 for s64 stores on rv32.
359-
if (GPRSize == 32 && Ty.getSizeInBits().getKnownMinValue() == 64 &&
360-
!Ty.isVector()) {
353+
if (!Ty.isVector() && GPRSize == 32 &&
354+
Ty.getSizeInBits().getKnownMinValue() == 64) {
361355
assert(MF.getSubtarget<RISCVSubtarget>().hasStdExtD());
362356
OpdsMapping[0] = getFPValueMapping(Ty.getSizeInBits());
363357
break;

0 commit comments

Comments
 (0)