[llvm] [WebAssembly][GlobalISel] Implement pointer and memory ops. (PR #206885)
Demetrius Kanios via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 22:59:25 PDT 2026
================
@@ -165,6 +199,94 @@ bool WebAssemblyInstructionSelector::select(MachineInstr &I) {
I.setDesc(TII.get(TargetOpcode::IMPLICIT_DEF));
return RBI.constrainGenericRegister(DefReg, *DefRC, MRI) != nullptr;
}
+ case G_PTRTOINT: {
----------------
QuantumSegfault wrote:
@arsenm
I looked into this a bit more, and even if I hack `G_PTRMASK` into match alongside `G_AND` when importing `and` DAG patterns, it won't cooperate. Likely something to do with the `SDTCisInt` constraint `SDTIntBinOp`.
-----------
Best I've been able to do is create a `ptrmask_gi` node for compat purposes. It'll let us move the patterns to tablegen, but they still need to be duplicated. And I wouldn't know the right way to port the patterns from the other targets to tablegen anyway.
Similar situation with the other two. I can add compat nodes, and maybe port some of the simple logic to tablegen.
-----------
How do you want to proceed?
https://github.com/llvm/llvm-project/pull/206885
More information about the llvm-commits
mailing list