[PATCH] D139950: [WebAssembly] Use ComplexPattern on store address operands

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 02:11:18 PST 2022


luke added inline comments.


================
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(); }]>;
+
----------------
aheejin wrote:
> 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?
I’ve been working on atomic as part of a separate diff, but happy to include them in this one if that’s easier!
The conversion process is the same, and for the atomic instructions you’ll be glad to hear it saves a lot of tablegen. 


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