[llvm] [VPlan] Use SCEV to prove non-aliasing for stores at different offsets. (PR #170347)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 8 05:52:54 PST 2025
================
@@ -165,6 +204,15 @@ static bool canHoistOrSinkWithNoAliasCheck(
if (!R.mayWriteToMemory() && !(CheckReads && R.mayReadFromMemory()))
continue;
+ // For stores, check if we can use SCEV to prove no-alias with the group
+ // leader (all members of the group write to the same address with the
+ // same size).
+ if (auto *Store = dyn_cast<VPReplicateRecipe>(&R)) {
+ if (GroupLeader &&
----------------
fhahn wrote:
I am not sure re-ordering makes things safer, as they are still all default arguments and it still relies on the caller either passing nullptr for all or non of them. I added a dedicated helper class to encapsulate the extra functionality, to make this safer.
https://github.com/llvm/llvm-project/pull/170347
More information about the llvm-commits
mailing list