[llvm] [InstCombine] Revert the `signed icmp -> unsigned icmp` canonicalization when folding `icmp Pred min|max(X, Y), Z` (PR #76685)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 4 07:47:38 PST 2024
nikic wrote:
> > BTW, should we add a flag like nneg to indicate that an unsigned icmp can be treated as a signed one?
>
> @nikic Any thoughts?
Yes, we should, though I don't think it should be `nneg` in particular, as for icmp we need "same sign" rather than "non-negative". The variant I have been considering is to add new `lt`, `le`, `gt`, `ge` predicates that are sign-independent, with `getPredicate()` normalizing them to unsigned by default, with the option to treat them separately.
https://github.com/llvm/llvm-project/pull/76685
More information about the llvm-commits
mailing list