[llvm] [InstCombine] Fold `icmp samesign u{gt/ge/lt/le} (X +nsw C2), C` -> `icmp s{gt/ge/lt/le} X, (C - C2)` (PR #169960)
Tirthankar Mazumder via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 29 00:32:48 PST 2025
wermos wrote:
> there is a fold above the new fold that handled this case without the samesign flag.
Are you suggesting that I should modify that code to handle the samesign case as well? Since that code uses `computeConstantRange` which I am not too familiar with, I opted to add a new if clause.
https://github.com/llvm/llvm-project/pull/169960
More information about the llvm-commits
mailing list