[WebAssembly][NFC] Add ComplexPattern for loads
authorLuke Lau <luke@igalia.com>
Wed, 14 Dec 2022 12:10:03 +0000 (12:10 +0000)
committerAlex Bradbury <asb@igalia.com>
Wed, 14 Dec 2022 12:11:30 +0000 (12:11 +0000)
commit982b8e0bbb38d7d411716192fc398500606ecedd
tree7ec8d406b74e772ac2d6e6ce92ee9366b89c0c13
parent463910ab2a8d95dd08ddba60f81b418693c8ee5b
[WebAssembly][NFC] Add ComplexPattern for loads

This refactors out the offset and address operand pattern matching into
a ComplexPattern, so that one pattern fragment can match the dynamic and
static (offset) addresses in all possible positions.

Split out from D139530, which also contained an improvement to global
address folding.

Differential Revision: https://reviews.llvm.org/D139631
llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td