[PATCH] D79381: [X86] Fix usage of Align constructing MachineMemOperands.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 11:53:14 PDT 2020


craig.topper marked an inline comment as done.
craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:8691
           unsigned NumElm = SplatBitSize / VT.getScalarSizeInBits();
-          unsigned Alignment = cast<ConstantPoolSDNode>(VCP)->getAlignment();
+          MaybeAlign Alignment(cast<ConstantPoolSDNode>(VCP)->getAlignment());
           Ld = DAG.getLoad(
----------------
efriedma wrote:
> Ultimately, we want to get rid of the MaybeAlign overload of getLoad(); please compute the alignment explicitly here.  I guess `DAG.getEVTAlign(MVT::getVectorVT(CVT, NumElm))`?
Based on what I found in D79436 where I'm converting ConstantPoolSDNode to use Align, I don't think we ever create ConstantPoolSDNodes with a 0 alignment. Can I fix this when I remove getAlignment from ConstantPoolSDNode?


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

https://reviews.llvm.org/D79381





More information about the llvm-commits mailing list