[llvm] [IndVarSimplify] Keep additional nuw and nsw flags during LinearFunctionTestReplace (PR #177433)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 11:10:32 PDT 2026
antoniofrighetto wrote:
> This is only true if the comparison changed from signed to unsigned though.
Would you have an example of this in mind? As far as I know, samesign doesn't encode the "directionality", i.e., if it is present, then the signed interpretation of the comparison is valid. It's true that, per canonicalizations, one would expect to mostly always see samesign in an unsigned predicate, but I don't see why nsw couldn't be preserved in the other direction (which I think is also what @nikic was pointing out above).
https://github.com/llvm/llvm-project/pull/177433
More information about the llvm-commits
mailing list