[RISCV] Add tests for possible splat optimizations
authorFraser Cormack <fraser@codeplay.com>
Fri, 28 Jan 2022 12:14:12 +0000 (12:14 +0000)
committerFraser Cormack <fraser@codeplay.com>
Fri, 28 Jan 2022 12:32:29 +0000 (12:32 +0000)
commit10879c26a20307abb3f0d29da6504f6cc9cc41e3
tree38737a73dbab917c1bbddaf32ef43290e2d17734
parent6297f929f73134736fadf704056fda3dee4ace9b
[RISCV] Add tests for possible splat optimizations

These splats -- whether BUILD_VECTOR or SPLAT_VECTOR -- are formed by
first extracting a value from a vector and splatting it to all elements
of the destination vector. These could be performed more optimally,
avoiding the drop to scalar, using RVV's vrgather, for example.
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-buildvec.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-buildvec.ll
llvm/test/CodeGen/RISCV/rvv/splat-vectors.ll [new file with mode: 0644]