[PATCH] D143409: [SCEV][IndVarSimplify] Add nsw/nuw falgs to binary ops before visiting IVUsers
Aleksandr Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 16 18:06:54 PST 2023
aleksandr.popov added a comment.
> I suspect that what actually happens is that as part of the getZeroExtendExpr() call, we infer a nowrap flag on the addrec in https://github.com/llvm/llvm-project/blob/7a49d50f22ad577d91cda7904c8a162c2cecd4a8/llvm/lib/Analysis/ScalarEvolution.cpp#L1688, or one of the later bits in the same method. If this is the case, it would be nice to know which one is responsible here, and in particular whether it is the constant range one.
We infer a nowrap flag on the addrec from the proveNoUnsignedWrapViaInduction(AR) call: https://github.com/llvm/llvm-project/blob/7a49d50f22ad577d91cda7904c8a162c2cecd4a8/llvm/lib/Analysis/ScalarEvolution.cpp#L1776
This seems to be the reason why patch https://reviews.llvm.org/D144050 from Florian didn't help in the case
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143409/new/
https://reviews.llvm.org/D143409
More information about the llvm-commits
mailing list