[RISCV][NFC] Add test case for SLP reduction vectorization failure
authorLuke Lau <luke@igalia.com>
Tue, 21 Mar 2023 14:46:15 +0000 (14:46 +0000)
committerLuke Lau <luke@igalia.com>
Tue, 21 Mar 2023 15:57:52 +0000 (15:57 +0000)
commite69f8bac42e5c3e636a1b06c08fc2739ac1d9b36
treebc7f77c8d88edb1ad3618489fa0d821b47bdaf4d
parent67852bff588285b2dcf1eaa0c42389d297430465
[RISCV][NFC] Add test case for SLP reduction vectorization failure

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.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D146529
llvm/test/Transforms/SLPVectorizer/RISCV/reductions.ll