[llvm] [SLP] Handle strides that are the results of multiplication by constant (PR #194746)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 00:54:24 PDT 2026


nikic wrote:

> Update -TryGetStride to always call SE.getUDivExactExpr, setting any multiplications to NUW. I'm not entirely sure if this is safe to do, but it matches the current behavior (we implicitly assume NUW when we match the operands in the current TryGetStride)

No, this is illegal. SCEV nowrap flags are global, so you are claiming that this multiplication can *never* overflow, anywhere in the program. (There is work ongoing for use-specific nowrap flags, but it's not ready for usage.)

https://github.com/llvm/llvm-project/pull/194746


More information about the llvm-commits mailing list