[llvm] [RISCV][GISel] Merge selectGlobalValue and selectJumpTable. NFC (PR #72759)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 07:46:04 PST 2023
================
@@ -789,26 +796,26 @@ bool RISCVInstructionSelector::selectGlobalValue(
// (lui %hi(sym)) %lo(sym)).
Register AddrHiDest = MRI.createVirtualRegister(&RISCV::GPRRegClass);
MachineInstr *AddrHi = MIB.buildInstr(RISCV::LUI, {AddrHiDest}, {})
- .addGlobalAddress(GV, 0, RISCVII::MO_HI);
+ .addDisp(DispMO, 0, RISCVII::MO_HI);
if (!constrainSelectedInstRegOperands(*AddrHi, TII, TRI, RBI))
return false;
Result = MIB.buildInstr(RISCV::ADDI, {DefReg}, {AddrHiDest})
- .addGlobalAddress(GV, 0, RISCVII::MO_LO);
+ .addDisp(DispMO, 0, RISCVII::MO_LO);
if (!constrainSelectedInstRegOperands(*Result, TII, TRI, RBI))
return false;
MI.eraseFromParent();
return true;
}
- case CodeModel::Medium: {
+ case CodeModel::Medium:
----------------
michaelmaitland wrote:
Do we need the `{}` for this case?
https://github.com/llvm/llvm-project/pull/72759
More information about the llvm-commits
mailing list