[llvm] [LLVM][SelectionDAG] Don't assume masked loads access all lanes in memory. (PR #192706)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 22:55:01 PDT 2026
================
@@ -5122,7 +5122,7 @@ void SelectionDAGBuilder::visitMaskedLoad(const CallInst &I, bool IsExpanding) {
MachineMemOperand *MMO = DAG.getMachineFunction().getMachineMemOperand(
MachinePointerInfo(PtrOperand), MMOFlags,
- VT.getStoreSize(), Alignment, AAInfo, Ranges);
+ LocationSize::beforeOrAfterPointer(), Alignment, AAInfo, Ranges);
----------------
davemgreen wrote:
When I looked at it before it seemed like it would be better for the MMO to have a "predicated" flag or something, so that the store size is correct for the maximal size of the memory operation but the AA can account for cases where the whole location is not necessarily accessed.
https://github.com/llvm/llvm-project/pull/192706
More information about the llvm-commits
mailing list