[PATCH] D68417: [MachineVerify] Verify property of atomic G_LOAD/STORE variants

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 16:58:09 PDT 2019


arsenm added inline comments.


================
Comment at: lib/CodeGen/MachineVerifier.cpp:1036-1037
+      if (MMO.isAtomic()) {
+        if (MMO.getAlignment() == 0)
+          report("Atomics must have explicit alignment", MI);
+        if (ValTy.isVector())
----------------
reames wrote:
> arsenm wrote:
> > arsenm wrote:
> > > IMO we should remove alignment 0 from all points in the IR and MIR
> > On second thought, I'm not sure this is necessary. The MIRParser won't ever produce a 0 base alignment MMO. This can probably be replaced with an assert in the MMO constructor
> This is a good idea.  I will do so.
I'm not sure the MIParser rejects 0, it just doesn't default to 0. It would be a good idea to make sure that happens also


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68417/new/

https://reviews.llvm.org/D68417





More information about the llvm-commits mailing list