The transformation is benefit because vmerge.vvm always needs mask operand but
vadd.vi may not.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
2511 | Do we have an instruction that mask operand is not v0? I am confused by the condition. |
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
2511 | We *might* allow mask hold other than v0 register in future vector extension, so having this checking should be harmless, and could catch unexpected case in future. |
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | ||
---|---|---|
2511 | Thank your explanation. |
I still moved useAllOnesMask into performVMergeToVAdd, since only
performVMergeToVAdd needs to call useAllOnesMask.
But the new function performCombineVMergeAndVOps also serves vmerge.vvm without all ones mask.
use -> uses?