[llvm] [DA] do not handle array accesses of different offsets (PR #123436)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Mon May 12 06:57:43 PDT 2025
================
@@ -10971,6 +10971,52 @@ bool ScalarEvolution::isKnownToBeAPowerOfTwo(const SCEV *S, bool OrZero,
return all_of(Mul->operands(), NonRecursive) && (OrZero || isKnownNonZero(S));
}
+bool ScalarEvolution::isKnownMultipleOf(
+ const SCEV *S, uint64_t M,
+ SmallVectorImpl<const SCEVPredicate *> &Assumptions) {
+ if (M == 0)
+ return false;
----------------
Meinersbur wrote:
`S==0` in the context of getMinusSCEV would mean an eltSize of 0, which means memory will never be accessed which means there never is a dependency. But there isn't necessarily this context for the caller of `isKnownMultipleOf`.
This function can always return false, since it is returns true of if it is a *known* multiple. The case `0/0` is still questionable, so it is safe to return false here.
https://github.com/llvm/llvm-project/pull/123436
More information about the llvm-commits
mailing list