[RISCV] Correct the setcc in vp.floor/ceil/round/roundeven lowering.
authorCraig Topper <craig.topper@sifive.com>
Tue, 4 Oct 2022 01:50:34 +0000 (18:50 -0700)
committerCraig Topper <craig.topper@sifive.com>
Tue, 4 Oct 2022 03:58:05 +0000 (20:58 -0700)
commitb41fe90dc3ca442ea3a1f2039891ec0534273bb2
tree6d0ae28ed43b0e068d8a4599f013f863ecd2a7d4
parentff85a1879c6b4fdd0b7ecd0e18b4b2f6a87899ec
[RISCV] Correct the setcc in vp.floor/ceil/round/roundeven lowering.

We want to emit a masked setcc that preserves zeros in all of the bits
where the original mask is zero. To do this we need to pass the original
mask as the passthru operand as well. Otherwise, we'll use the mask agnostic
policy and replace the zeros with 1s on some CPUs.

Differential Revision: https://reviews.llvm.org/D135122
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/ceil-vp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-ceil-vp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-floor-vp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-round-vp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-roundeven-vp.ll
llvm/test/CodeGen/RISCV/rvv/floor-vp.ll
llvm/test/CodeGen/RISCV/rvv/round-vp.ll
llvm/test/CodeGen/RISCV/rvv/roundeven-vp.ll