[llvm] [RISCV][GlobalISel] Select G_FRAME_INDEX (PR #68254)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 17:45:46 PDT 2023


================
@@ -239,6 +239,19 @@ bool RISCVInstructionSelector::select(MachineInstr &MI) {
   }
   case TargetOpcode::G_SEXT_INREG:
     return selectSExtInreg(MI, MIB);
+  case TargetOpcode::G_FRAME_INDEX: {
+    // TODO: We may want to replace this code with the SelectionDAG patterns,
+    // which fail to get imported because it uses FrameAddrRegImm, which is a
+    // ComplexPattern
+    Register DstReg = MI.getOperand(0).getReg();
+
+    if (!MRI.getType(DstReg).isPointer())
----------------
topperc wrote:

Do we need this check? AArch64 has it but they were primarily checking for address space 0. The destination should always be some sort of pointer right?

https://github.com/llvm/llvm-project/pull/68254


More information about the llvm-commits mailing list