[PATCH] D96522: [LV] Try larger VFs if VF is unprofitable for small types.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 9 12:26:05 PST 2022
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5795
+ if (SmallestType <= 32 && SmallestType < WidestType &&
+ !MaxVectorSize.isScalable()) {
+ Type *SmallVT = FixedVectorType::get(
----------------
sdesmalen wrote:
> nit: this condition is currently always true. Can you change this into an assert?
I updated the code to support scalable vectors. But it seems like the cost model considers loads of `<vscale x 4 x i8>` as expensive as `<vscale x 16 x i8>` so the higher VF isn't chosen for scalable vectors. And the maximized fixed VF seems to be more profitable than the scalable one, so we end up choosing `<16 x i8>` (see the scalable tests)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96522/new/
https://reviews.llvm.org/D96522
More information about the llvm-commits
mailing list