[RISCV] Lower splats of non-constant i1s as SETCCs
authorFraser Cormack <fraser@codeplay.com>
Wed, 28 Apr 2021 15:11:57 +0000 (16:11 +0100)
committerFraser Cormack <fraser@codeplay.com>
Tue, 4 May 2021 08:14:05 +0000 (09:14 +0100)
commit46fa214a6f24549d83a69793b7e14585c2eefa2b
treed595c4f5bce6966b3a8d1419428539138b3dcee8
parent18883a3fec5a153ab64fb756f6c7f92bce9f9283
[RISCV] Lower splats of non-constant i1s as SETCCs

This patch adds support for splatting i1 types to fixed-length or
scalable vector types. It does so by lowering the operation to a SETCC
of the equivalent i8 type.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D101465
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-mask-splat.ll
llvm/test/CodeGen/RISCV/rvv/vsplats-i1.ll