[RISCV] Use vmv.s.x to build one element splat vector.
authorjacquesguan <jacquesguan@me.com>
Sat, 25 Dec 2021 10:09:27 +0000 (18:09 +0800)
committerjacquesguan <jacquesguan@me.com>
Tue, 11 Jan 2022 02:21:18 +0000 (10:21 +0800)
commitb607cd39281f71528f82f0de8b230fff7217dc7e
tree5e6b06a9333b585f785677abe93b9d2f28fc23ae
parentf62f47f5e1f641b41d3b7d593c058ebec2883534
[RISCV] Use vmv.s.x to build one element splat vector.

When we want to create an splat vector that only the first element is initialized, we could use vmv.s.x or vfmv.s.f to build it.

Differential Revision: https://reviews.llvm.org/D116277
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-fp-vp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-fp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int-vp.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int.ll
llvm/test/CodeGen/RISCV/rvv/vreductions-fp-sdnode.ll
llvm/test/CodeGen/RISCV/rvv/vreductions-fp-vp.ll
llvm/test/CodeGen/RISCV/rvv/vreductions-int-rv32.ll
llvm/test/CodeGen/RISCV/rvv/vreductions-int-rv64.ll
llvm/test/CodeGen/RISCV/rvv/vreductions-int-vp.ll