[RISCV] Fold special case (xor (setcc constant, y, setlt), 1) -> (setcc y, constant...
authorLiaoChunyu <chunyu@iscas.ac.cn>
Sat, 17 Jun 2023 01:33:48 +0000 (09:33 +0800)
committerLiaoChunyu <chunyu@iscas.ac.cn>
Sat, 17 Jun 2023 02:10:20 +0000 (10:10 +0800)
commit12fee611ca533231f12c0b6518bfc525c893f238
treea35fb02204df7f8446620447eecbe6f05127fff5
parentb84721df636747a9955408a934e713192a9cfe21
[RISCV] Fold special case (xor (setcc constant, y, setlt), 1) -> (setcc y, constant + 1, setlt)

Improve D151719.
(xor (setcc constant, y, setlt), 1) -> (setcc y, constant + 1, setlt)
https://alive2.llvm.org/ce/z/BZNEia

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D152128
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/double-select-icmp.ll
llvm/test/CodeGen/RISCV/float-select-icmp.ll
llvm/test/CodeGen/RISCV/half-select-icmp.ll