[PATCH] D150991: [LV] Use Legal::isUniform to detect uniform pointers.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 04:16:29 PDT 2023
fhahn marked 2 inline comments as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4709
};
return getLoadStorePointerOperand(I) == Ptr && isUniformDecision(I, VF) &&
GetStoredValue() != Ptr;
----------------
Ayal wrote:
> How about the above alternative change? Seems more inline with isVectorizedMemAccessUse's documentation.
> While we're here, an early exit seems simpler:
> ```
> if (isa<StoreInst>(I) && I->getOperand(0) == Ptr)
> return false;
> ```
Thanks, updated to use the alternative fix.
Early exit added in b75086210774
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:4760
if (isVectorizedMemAccessUse(&I, Ptr)) {
assert(isUniformDecision(&I, VF) && "consistency check");
HasUniformUse.insert(Ptr);
----------------
Ayal wrote:
> This assert is currently redundant, and needs to be dropped (along with {}) in the alternative fix above.
Updated, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150991/new/
https://reviews.llvm.org/D150991
More information about the llvm-commits
mailing list