[llvm] [InstCombine] Fold `(x < y) ? -1 : zext(x > y)` and `(x > y) ? 1 : sext(x < y)` to `ucmp/scmp(x, y)` (PR #105272)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 05:31:53 PDT 2024
nikic wrote:
After this, I think the only remaining pattern is where the outer select has an equality condition. And I just found that we have a function for matching it already: https://github.com/llvm/llvm-project/blob/6932f47cfdf4734d68759586047aee240861058e/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp#L3165
https://github.com/llvm/llvm-project/pull/105272
More information about the llvm-commits
mailing list