If avl is vlmax and lmul is not fractional, there is no tail element so that no need to demand tail policy.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp | ||
---|---|---|
380 | The VL operand can be stale here because this is called from doLocalPostpass, after the pseudo has been expanded and the vsetvlis are inserted. Is it possible to move this into needVSETVLI? |
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp | ||
---|---|---|
375 | This is incorrect for vcompress, reductions, and vmv.s.x. |
llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll | ||
---|---|---|
585 | Wouldn't we want ta instead of tu since there is no tail? |
llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll | ||
---|---|---|
585 | Done. |
Taking a step back from the code, can you say a little about the motivation for this? I don't see anything particularly compelling in the test diffs. Why do you think this is an interesting optimization to implement?
Also, you definitely need more meaningful test coverage before this is reviewable. However, let's start with the motivation as I don't want to waste your time on writing tests if we're going to end up taking a different approach anyways.
This is incorrect for vcompress, reductions, and vmv.s.x.