[LV] Adjust cost model to use uniform store lowering for unpredicated uniform stores
authorPhilip Reames <preames@rivosinc.com>
Tue, 27 Sep 2022 14:22:41 +0000 (07:22 -0700)
committerPhilip Reames <listmail@philipreames.com>
Tue, 27 Sep 2022 14:28:40 +0000 (07:28 -0700)
commitdc7387b58735166dea4be75c916291fa6f9ce0ad
tree64ce8ca0632a25a9a274c20c11c569a959eb0f93
parentef89409a59f3b79ae143b33b7d8e6ee6285aa42f
[LV] Adjust cost model to use uniform store lowering for unpredicated uniform stores

Follow up to D133580; adjust the cost model to prefer uniform store lowering for scalable stores which are unpredicated.

The impact here isn't in the uniform store lowering quality itself. InstCombine happily converts the scatter form into the single store form. The main impact is in letting the rest of the cost model make choices based on the knowledge that the vector will be scalarized on use.

Differential Revision: https://reviews.llvm.org/D134460
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/AArch64/sve-inv-store.ll
llvm/test/Transforms/LoopVectorize/RISCV/uniform-load-store.ll