[RISCV] Allow compatible VTYPE in AVL Reg Forward cases
authorPhilip Reames <preames@rivosinc.com>
Thu, 26 May 2022 14:56:38 +0000 (07:56 -0700)
committerPhilip Reames <listmail@philipreames.com>
Thu, 26 May 2022 15:50:35 +0000 (08:50 -0700)
commitafe49934a68afdf44dcd48489d9f5e820bc5424d
tree2ec0d9db85edbcd44ecf0da326a472c65d453c02
parent7b809c30b9261b167cf55ce289eccf88c6000c65
[RISCV] Allow compatible VTYPE in AVL Reg Forward cases

During insertion of VSETVLI, we have two related bits of code which decide whether we can reuse a previous vsetvli result. As was pointed out in the original review, these cases can allow any prior state for which we know that VL is the same for any value of AVL.

This was originally separated out of a desire for separate tests and review. As it turns out, finding a test case for this has been quite challenging. Most of the cases I tried, we manage to already get through other chains of logic. We do have one correct test change, but that only exercises one of the two changes.

Differential Revision: https://reviews.llvm.org/D126400
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll