History log of /llvm-project/llvm/test/Transforms/InstCombine/scmp.ll (Results 1 – 7 of 7)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1
# d4798498 23-Sep-2024 Volodymyr Vasylkun <vvmposeydon@gmail.com>

[InstCombine] Fold `(x == y) ? 0 : (x > y ? 1 : -1)` into `ucmp/scmp(x,y)` (#107314)

This also handles commuted cases of the same fold, with either the
condition or the true/false values of the inn

[InstCombine] Fold `(x == y) ? 0 : (x > y ? 1 : -1)` into `ucmp/scmp(x,y)` (#107314)

This also handles commuted cases of the same fold, with either the
condition or the true/false values of the inner select being swapped.

show more ...


Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4
# da6f4232 23-Aug-2024 Volodymyr Vasylkun <vvmposeydon@gmail.com>

[InstCombine] Fold `(x < y) ? -1 : zext(x > y)` and `(x > y) ? 1 : sext(x < y)` to `ucmp/scmp(x, y)` (#105272)

This patch expands already existing funcionality to include these two
additional folds

[InstCombine] Fold `(x < y) ? -1 : zext(x > y)` and `(x > y) ? 1 : sext(x < y)` to `ucmp/scmp(x, y)` (#105272)

This patch expands already existing funcionality to include these two
additional folds, which are nearly identical to the ones already
implemented.

Proofs: https://alive2.llvm.org/ce/z/Xy7s4j

show more ...


# d1639355 22-Aug-2024 Volodymyr Vasylkun <vvmposeydon@gmail.com>

[InstCombine] Fold `scmp(x -nsw y, 0)` to `scmp(x, y)` (#105583)

Proof: https://alive2.llvm.org/ce/z/v6VtXz


Revision tags: llvmorg-19.1.0-rc3
# abf69a16 19-Aug-2024 Volodymyr Vasylkun <vvmposeydon@gmail.com>

[InstCombine] Fold `(x < y) ? -1 : zext(x != y)` into `u/scmp(x,y)` (#101049)

This patch adds the aforementioned fold to InstCombine. This pattern is
produced after naive implementations of 3-way c

[InstCombine] Fold `(x < y) ? -1 : zext(x != y)` into `u/scmp(x,y)` (#101049)

This patch adds the aforementioned fold to InstCombine. This pattern is
produced after naive implementations of 3-way comparison in high-level
languages are transformed into LLVM IR and then optimized.

Proofs: https://alive2.llvm.org/ce/z/w4QLq_

show more ...


# 7e23a23d 16-Aug-2024 Volodymyr Vasylkun <vvmposeydon@gmail.com>

[InstCombine] Fold an unsigned icmp of ucmp/scmp with a constant to an icmp of the original arguments (#104471)

Proofs: https://alive2.llvm.org/ce/z/9mv8HU


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 8c664a9f 10-Jul-2024 Poseydon42 <vvmposeydon@gmail.com>

[InstCombine] Fold negation of calls to `ucmp/scmp` by swapping its operands (#98360)

Proofs: https://alive2.llvm.org/ce/z/cp_a36


# 905e4ec7 22-Jun-2024 Poseydon42 <vvmposeydon@gmail.com>

[InstCombine] Implement folds of icmp of UCMP/SCMP call and a constant (#96118)

This patch handles various cases where an operation of the kind `icmp
(ucmp/scmp x, y), constant` folds to `icmp x, y

[InstCombine] Implement folds of icmp of UCMP/SCMP call and a constant (#96118)

This patch handles various cases where an operation of the kind `icmp
(ucmp/scmp x, y), constant` folds to `icmp x, y`. Another patch with
cases where this operation folds to a constant (i.e. dumb cases like
`icmp eq (cmp x, y), 4` should be published in a couple of days.

I wasn't sure what negative tests should be added here, if any are
necessary at all. I'd love to hear your suggestions.

Proofs (ucmp): https://alive2.llvm.org/ce/z/qQ7ihz
Proofs (scmp): https://alive2.llvm.org/ce/z/cipKEn

---------

Co-authored-by: Nikita Popov <github@npopov.com>

show more ...