Horizontal reductions still occur on RISC-V, despite the maximum SLP VF
reported back by TTI being 1, to disable SLP.
This can cause the cost model to think it can vectorize a gather into
smaller, widened loads, when it will actually fail to do so.
This should ultimately be fixed whenever SLP is re-enabled for RISC-V at
some point.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM
llvm/test/Transforms/SLPVectorizer/RISCV/reductions.ll | ||
---|---|---|
846 | I just want to point out that this is a very weird bit of code. We generate one pair of vector loads, but we could have generated the four scalar loads as a two vector loads as well. What we model as a vector load + two inserts of scalars could easily be two vector loads and a concat of two vectors. |
I just want to point out that this is a very weird bit of code. We generate one pair of vector loads, but we could have generated the four scalar loads as a two vector loads as well. What we model as a vector load + two inserts of scalars could easily be two vector loads and a concat of two vectors.