[PATCH] D86928: [SVE][CodeGen] Fix TypeSize/ElementCount related warnings in sve-split-store.ll

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 4 22:11:03 PDT 2020


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:2449
+      Type *HiMemTy = HiMemVT.getTypeForEVT(*DAG.getContext());
+      Alignment = DAG.getDataLayout().getABITypeAlign(HiMemTy);
+      MPI = MachinePointerInfo(N->getPointerInfo().getAddrSpace());
----------------
david-arm wrote:
> efriedma wrote:
> > The ABI alignment isn't relevant here.  The relevant numbers are the specified alignment, and the size of LoMemVT.  Basically, we need to reduce the alignment if it's bigger than the size of LoMemVT.
> > 
> > I'm sure we have at least one example of this elsewhere.
> OK, I'm struggling to know how to proceed here. I've tried again using a function called commonAlignment that works out the minimum of the original alignment and the LoMemVT size. Is this what you mean?
This looks right.


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

https://reviews.llvm.org/D86928



More information about the llvm-commits mailing list