RISCV fold of vscale add on rvv is not optimal
Open
backend:RISC-V
good first issue
missed-optimization
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The fold
(A + vscale(C1)) + vscale(C2) -> A + vscale(C1 + C2)
does not seem to beneficial for riscv when inner add has multiple uses, as it would introduce extra add.
unnecesary add can be optimized from here: https://godbolt.org/z/9xfWc5voc
Contributor guide
Assessment
This issue has not been assessed yet.