File tree Expand file tree Collapse file tree 2 files changed +958
-0
lines changed
test/CodeGen/RISCV/GlobalISel Expand file tree Collapse file tree 2 files changed +958
-0
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,10 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
324324
325325 OpdsMapping[0 ] = GPRValueMapping;
326326
327+ // Atomics always use GPR destinations. Don't refine any further.
328+ if (cast<GLoad>(MI).isAtomic ())
329+ break ;
330+
327331 // Use FPR64 for s64 loads on rv32.
328332 if (GPRSize == 32 && Size.getFixedValue () == 64 ) {
329333 assert (MF.getSubtarget <RISCVSubtarget>().hasStdExtD ());
@@ -358,6 +362,10 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
358362
359363 OpdsMapping[0 ] = GPRValueMapping;
360364
365+ // Atomics always use GPR sources. Don't refine any further.
366+ if (cast<GStore>(MI).isAtomic ())
367+ break ;
368+
361369 // Use FPR64 for s64 stores on rv32.
362370 if (GPRSize == 32 && Size.getFixedValue () == 64 ) {
363371 assert (MF.getSubtarget <RISCVSubtarget>().hasStdExtD ());
You can’t perform that action at this time.
0 commit comments