[RISCV] Add a test case showing unnecessary vsetvli for mask register instructions.
authorCraig Topper <craig.topper@sifive.com>
Thu, 28 Oct 2021 21:42:29 +0000 (14:42 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 28 Oct 2021 22:03:09 +0000 (15:03 -0700)
commit67c44a997854c3b95e84f1f817c0eeac61fddc1b
tree71f0d5b55b08e12ef9111bbd0b8c935285e4531f
parenta70a5636a8a46a31057d826578d3703fcede2eff
[RISCV] Add a test case showing unnecessary vsetvli for mask register instructions.

If the VL argument for a mask instruction comes from a vsetvli with
an SEW!=8, we will insert an extra vsetvli for the mask instruction
even if the SEW/LMUL ratio is the same. This requires at least one
instruction before the mask instruction that needs the SEW of the
explicit vsetvli. Otherwise, we'll just rewrite the explicit vsetvli.
llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll