[llvm] [RISCV][GISEL] legalize, regbankselect, and instruction-select for G_… (PR #73061)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 17:34:10 PST 2023
================
@@ -353,6 +353,34 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
OpdsMapping[2] = OpdsMapping[3] = getFPValueMapping(Size);
break;
}
+ case TargetOpcode::G_MERGE_VALUES: {
+ // Use FPR64 for s64 merge on rv32.
+ assert(MI.getNumOperands() == 3 && "Unsupported G_MERGE_VALUES");
+ LLT Ty = MRI.getType(MI.getOperand(0).getReg());
+ if (GPRSize == 32 && Ty.getSizeInBits() == 64) {
+ assert(MF.getSubtarget<RISCVSubtarget>().hasStdExtD());
+ // FIXME: OpdsMapping[0, 1] should probably visit their uses to determine
----------------
michaelmaitland wrote:
If we had `f32, f32 = UNMERGE f64`, could we use `SplitF64Pseudo`?
If we had `f64 = MERGE f32, f32`, could we use `BuildPairF64Pseudo`?
https://github.com/llvm/llvm-project/pull/73061
More information about the llvm-commits
mailing list