File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
test/CodeGen/RISCV/GlobalISel/regbankselect Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
216
216
LLT Ty = MRI.getType (MI.getOperand (0 ).getReg ());
217
217
// Use FPR64 for s64 loads on rv32.
218
218
if (GPRSize == 32 && Ty.getSizeInBits () == 64 ) {
219
+ assert (MF.getSubtarget <RISCVSubtarget>().hasStdExtD ());
219
220
OperandsMapping =
220
221
getOperandsMapping ({getFPValueMapping (64 ), GPRValueMapping});
221
222
break ;
@@ -242,6 +243,7 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
242
243
LLT Ty = MRI.getType (MI.getOperand (0 ).getReg ());
243
244
// Use FPR64 for s64 stores on rv32.
244
245
if (GPRSize == 32 && Ty.getSizeInBits () == 64 ) {
246
+ assert (MF.getSubtarget <RISCVSubtarget>().hasStdExtD ());
245
247
OperandsMapping =
246
248
getOperandsMapping ({getFPValueMapping (64 ), GPRValueMapping});
247
249
break ;
Original file line number Diff line number Diff line change @@ -62,18 +62,18 @@ legalized: true
62
62
tracksRegLiveness : true
63
63
body : |
64
64
bb.1:
65
- liveins: $x10, $f10_d, $f11_d
65
+ liveins: $x10, $f10_d
66
66
67
67
; RV32-LABEL: name: fp_store_no_def_f64
68
- ; RV32: liveins: $x10, $f10_d, $f11_d
68
+ ; RV32: liveins: $x10, $f10_d
69
69
; RV32-NEXT: {{ $}}
70
70
; RV32-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $x10
71
71
; RV32-NEXT: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $f10_d
72
72
; RV32-NEXT: G_STORE [[COPY1]](s64), [[COPY]](p0) :: (store (s64))
73
73
; RV32-NEXT: PseudoRET
74
74
;
75
75
; RV64-LABEL: name: fp_store_no_def_f64
76
- ; RV64: liveins: $x10, $f10_d, $f11_d
76
+ ; RV64: liveins: $x10, $f10_d
77
77
; RV64-NEXT: {{ $}}
78
78
; RV64-NEXT: [[COPY:%[0-9]+]]:gprb(p0) = COPY $x10
79
79
; RV64-NEXT: [[COPY1:%[0-9]+]]:fprb(s64) = COPY $f10_d
You can’t perform that action at this time.
0 commit comments