[RISCV] Fix incorrect optimization for masked vmsgeu.vi with 0 immediate.
authorZakk Chen <zakk.chen@sifive.com>
Sun, 6 Mar 2022 23:05:13 +0000 (15:05 -0800)
committerZakk Chen <zakk.chen@sifive.com>
Mon, 7 Mar 2022 03:22:35 +0000 (19:22 -0800)
commit3be907621f158f3937e6a6c5fbf45a4b6cd6a414
treec5803dc3d5e05f5ce3201724006dab8cba3a6187
parentff50e81b500800708db927cbccca2ab52ec11884
[RISCV] Fix incorrect optimization for masked vmsgeu.vi with 0 immediate.

vmsgeu.vi with 0 is always true, but in the masked with mask undisturbed
policy, we still need to keep inactive elelemt which come from maskedoff.

We could return mask directly if it's mask agnostic policy in the future.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D121080
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/test/CodeGen/RISCV/rvv/vmsgeu-rv32.ll
llvm/test/CodeGen/RISCV/rvv/vmsgeu-rv64.ll