[llvm] [WebAssembly][GlobalISel] Implement pointer and memory ops. (PR #206885)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 00:30:33 PDT 2026


================
@@ -84,6 +98,40 @@ WebAssemblyInstructionSelector::WebAssemblyInstructionSelector(
 {
 }
 
+void WebAssemblyInstructionSelector::renderFrameIndex(MachineInstrBuilder &MIB,
+                                                      const MachineInstr &MI,
+                                                      int OpIdx) const {
+  assert(MI.getOpcode() == TargetOpcode::G_FRAME_INDEX && OpIdx == -1 &&
+         "Expected G_FRAME_INDEX");
+  MIB.add(MI.getOperand(1));
+}
+
+InstructionSelector::ComplexRendererFns
+WebAssemblyInstructionSelector::selectAddrOperands(LLT AddrType,
+                                                   unsigned int ConstOpc,
+                                                   MachineOperand &Root) const {
+
+  if (!Root.isReg())
----------------
arsenm wrote:

This should be impossible. It's an API defect that this takes a MachineOperand 

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


More information about the llvm-commits mailing list