If the VL value for a vector instruction comes from a vsetvli for
VLMAX and the SEW/LMUL ratio matches, we can replace the VL on the
instruction with X0. This allows all the vsetvlis generated for the
instruction to use VLMAX vsetvlis. Or it can prevent vsetvli
instructions from being generated in loops.
This is based on a test case rogfer01 sent me a while back and the code
found here https://repo.hca.bsc.es/gitlab/rferrer/llvm-epi/-/raw/EPI/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp.
We could propagate any AVL, but looking at some of the test changes for that
I'm not sure it makes sense. So I've restricted to just the VLMAX case.
clang-format not found in user’s local PATH; not linting file.