[RISCV] Fix handling of nxvXi64 vmsgt(u).vx intrinsics on RV32.
authorCraig Topper <craig.topper@sifive.com>
Thu, 1 Apr 2021 17:17:53 +0000 (10:17 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 1 Apr 2021 17:38:05 +0000 (10:38 -0700)
commitd157e3f387c918a6736fb29fccd78a80425e5f88
tree737ca5085011d56556c5741320a7fea642ea5cb1
parent1addc231cd5b948012c3c07ad0f6b671a0793e55
[RISCV] Fix handling of nxvXi64 vmsgt(u).vx intrinsics on RV32.

We need to splat the scalar separately and use .vv, but there is
no vmsgt(u).vv. So add isel patterns to select vmslt(u).vv with
swapped operands.

We also need to get VT to use for the splat from an operand rather
than the result since the result VT is nxvXi1.

Reviewed By: HsiangKai

Differential Revision: https://reviews.llvm.org/D99704
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
llvm/test/CodeGen/RISCV/rvv/vmsgt-rv32.ll
llvm/test/CodeGen/RISCV/rvv/vmsgt-rv64.ll
llvm/test/CodeGen/RISCV/rvv/vmsgtu-rv32.ll
llvm/test/CodeGen/RISCV/rvv/vmsgtu-rv64.ll