[llvm] [IndVarSimplify] Set samesign when converting signed comparison to unsigned comparison in eliminateIVComparison. (PR #138215)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu May 1 16:45:16 PDT 2025


https://github.com/preames approved this pull request.

LGTM to the current patch.

As a follow up, you could split the current transform into two bits
1) For both signed and unsigned predicates, set samesign if both operands are non-negative.
2) For signed samesign, convert to unsigned.  

I think that could be done by just reorganizing that if-clause a bit.  

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


More information about the llvm-commits mailing list