[PATCH] D57139: GlobalISel: Fix creating MMOs with align 0

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 15:28:02 PST 2019


aemerson accepted this revision.
aemerson added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/CodeGen/GlobalISel/IRTranslator.cpp:854
         .addMemOperand(MF->getMachineMemOperand(
-            MachinePointerInfo(Ptr), MachineMemOperand::MOStore, ListSize, 0));
+            MachinePointerInfo(Ptr), MachineMemOperand::MOStore, ListSize, 1));
     return true;
----------------
arsenm wrote:
> aemerson wrote:
> > arsenm wrote:
> > > aemerson wrote:
> > > > Can we use DL.getABITypeAlignment() here?
> > > Probably? I don't know anything about vastart. I'm not sure why this has an MMO in the first place
> > vastart's argument is a target dependent pointer to a va_list object on the stack, so I think it's worth it to try to get the right alignment. That said, 1 is always safe so I think it's ok to use for now.
> I've looked at what SelectionDAG does for this, and I'm still not clear on what to use. The targets are creating the MMO there, and each one seems to be doing something different. Most of the cases seem to create a MachinePointerInfo and then get*Store functions magically infer an alignment from the underlying IR value. Some targets are hardcoding this. I think this is a separate patch
Ok, fine.


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

https://reviews.llvm.org/D57139





More information about the llvm-commits mailing list