Meinersbur wrote: > > There are fundamental flaws in DA's implementation, particularly in how it > > handles wrapping of SCEVs. > > Tell me more about it in a separate bug, and let's see how we can work > towards fixing it.
If you look over the code you can see that no attention was paid to integer wrapping behavior. For instance, `x < y` is implemented in multiple places (e.g. `DependenceInfo::isKnownLessThan`) as ``` SE->isKnownNegative(getMinusSCEV(x,y)) ``` 1. `isKnownNegative` always assumes an signed interpretation (otherwise it could never be negative), but the code may use unsigned loop variables/pointer indices 2. Even if it is signed, if eg `x = 1`, `y = INT_MIN` (so x is obviously larger) `x - y` would wrap back into the negative and return true. > Instead of spreading FUD around [...] @kasuga-fj pointed out bugs in the current implementation. Whether those are sufficient to justify changing default behavior is subjective. Generally assume best intentions. https://github.com/llvm/llvm-project/pull/140182 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits