[PATCH] D79381: [X86] Fix usage of Align constructing MachineMemOperands.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 13:31:10 PDT 2020
efriedma 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(
----------------
craig.topper wrote:
> 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?
If you're confident getAlignment() never returns zero, please just cast to Align, not MaybeAlign.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79381/new/
https://reviews.llvm.org/D79381
More information about the llvm-commits
mailing list