[llvm] [InstCombine] Fold `scmp(x -nsw y, 0)` to `scmp(x, y)` (PR #105583)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 00:56:23 PDT 2024
nikic wrote:
A peculiarity of cmp intrinsics is that they do not canonicalize constants to the right (as that inverts the result), so technically there is also this conjugate pattern with 0 on the LHS: https://alive2.llvm.org/ce/z/TApp6E But probably in practice the 0 will still be on the right, normally.
https://github.com/llvm/llvm-project/pull/105583
More information about the llvm-commits
mailing list