[llvm] [ValueTracking] improve `isKnownNonZero` precision for `smax` (PR #88170)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 19:06:37 PDT 2024


https://github.com/nikic requested changes to this pull request.

I think there is too much magic in these APIs now. isKnownPositive() has a Known out parameter now, but it does not actually get initialized in all cases (if the value is actually a constant).

I think this would end up being cleaner overall if you just spelled out that extra isKnownNonZero call in the smax implementation directly.

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


More information about the llvm-commits mailing list