[PATCH] D139950: [WebAssembly] Use ComplexPattern on store address operands
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 00:20:18 PST 2022
aheejin added a comment.
Nice!
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td:14-33
+// WebAssembly constant offsets are performed as unsigned with infinite
+// precision, so we need to check for NoUnsignedWrap so that we don't fold an
+// offset for an add that needs wrapping.
+def regPlusImm : PatFrag<(ops node:$addr, node:$off),
+ (add node:$addr, node:$off),
+ [{ return N->getFlags().hasNoUnsignedWrap(); }]>;
+
----------------
It looks we don't convert atomic stores in this CL.. Is that going to be a follow-up, or is that not included in the plan? Is converting them different from the normal stores?
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td:24-26
+// These patterns match the static (offset) and dynamic (address stack operand)
+// operands for loads and stores, based on a combination of target global
+// addresses and constants.
----------------
Nit: 80 col wrapping
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139950/new/
https://reviews.llvm.org/D139950
More information about the llvm-commits
mailing list