[llvm] [WebAssembly] Fix lowering of (extending) loads from addrspace(1) globals (PR #155937)
Demetrius Kanios via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 12:57:00 PDT 2025
QuantumSegfault wrote:
I experimented with trying to rework the DAGCombine hook as a set of patterns...but didn't have much luck.
For the AND combine, it would probably boil down to 12 individual patterns, but I didn't quite figure out how to cleanly capture the LOAD (to get the load width) and the constant or build_vector to apply some manner of predicate to (to extract the appropriate APInt from the RHS, and check against the width of the load of the LHS). Something about either PatFrag, or ComplexPattern...but it seems like more headache then to just keep it fully in C++.
Then again, table-gen is still very new to me, so I could be missing something obvious.
---
If it's that problematic, I can keep trying, but it seems short of fixing the original optimization/combiner, this seems like the most straightforward solution as is.
https://github.com/llvm/llvm-project/pull/155937
More information about the llvm-commits
mailing list