[llvm] [DAG] Teach SelectionDAGBuilder to read parameter alignment of compressstore/expandload. (PR #83763)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 3 21:43:10 PST 2024
================
@@ -4746,6 +4748,8 @@ void SelectionDAGBuilder::visitMaskedLoad(const CallInst &I, bool IsExpanding) {
// @llvm.masked.expandload.*(Ptr, Mask, Src0)
Ptr = I.getArgOperand(0);
Alignment = std::nullopt;
+ if (MaybeAlign Align = I.getParamAlign(0))
+ Alignment = Align;
----------------
topperc wrote:
I think we should be using `I.getParamAlign(0).getValueOr(DAG.getEVTAlign(1))`. The call to `DAG.getEVTAlign(VT)` later doesn't make sense for a compressed store or expanding load. The vector type isn't really relevant. Maybe we would use the alignment for the element type, but 1 is conservatively correct.
https://github.com/llvm/llvm-project/pull/83763
More information about the llvm-commits
mailing list