If we're writing to an undef vector (i.e. implicit_def), we can change the value of bits outside the requested write without consequence. This allows us to avoid a VSETVLI just for narrowing the value written.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM other than the comment about elideCopies.
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp | ||
---|---|---|
1026 | I wonder if we should call elideCopies here like we do when we look for implicit def for tail policy. |
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp | ||
---|---|---|
1026 | Hmm it doesn't look like any existing lit tests need the elideCopies call in other location. So I'm not sure if that's still needed. It might be a left over from when we did vsetvli insertion right after SelectionDAG. |
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp | ||
---|---|---|
1026 | I'm going to take a closer look at this separately, and probably post a patch removing the copy handling. |
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp | ||
---|---|---|
1026 |
I wonder if we should call elideCopies here like we do when we look for implicit def for tail policy.