[RISCV] Return false from isShuffleMaskLegal except for splats.
authorCraig Topper <craig.topper@sifive.com>
Fri, 12 Mar 2021 00:21:42 +0000 (16:21 -0800)
committerCraig Topper <craig.topper@sifive.com>
Fri, 12 Mar 2021 04:02:49 +0000 (20:02 -0800)
commit1d26bbcf9bb3b9bf1d1efea9d0aeac667995db3f
treea06f4886302111c1c1ef4f3aa5578644344c3acd
parent8ef69c66d5aab9ca2f04e0aecf109a2d2f7bb4b9
[RISCV] Return false from isShuffleMaskLegal except for splats.

We don't support any other shuffles currently.

This changes the bswap/bitreverse tests that check for this in
their expansion code. Previously we expanded a byte swapping
shuffle through memory. Now we're scalarizing and doing bit
operations on scalars to swap bytes.

In the future we can probably use vrgather.vx to do a byte swap
shuffle.
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitreverse.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-bswap.ll