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

Demetrius Kanios via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 1 01:12:14 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())
----------------
QuantumSegfault wrote:

How do you want this changed? Make it into an assert?

Or are you saying you want a PR to make `GICustomOperandRenderer` take a `Register` instead of a `MachineOperand`?

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


More information about the llvm-commits mailing list