[PATCH] D101297: [SLP]Allow masked gathers only if allowed by target.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 04:57:26 PDT 2021
ABataev added inline comments.
================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/pr47629-inseltpoison.ll:55
+; CHECK-NEXT: store <4 x i32> [[TMP7]], <4 x i32>* [[TMP8]], align 4, !tbaa [[TBAA0]]
+; CHECK-NEXT: ret void
;
----------------
anton-afanasyev wrote:
> Hmm, so this is even less strict. Then pr50015 isn't fixed as well.
Yes, because currently we incorrectly calculate the cost of masked gathers for SLP. If the masked gather is not legal/profitable, TTI returns its scalarized cost, which is `gather cost + cost of scalar loads`, while for SLP we should end up with just gather cost. This prevents some vectorizations if masked gather is not legal and/or profitable.
Plus, this patch never meant to fix pr50015, just to improve the vectorization.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101297/new/
https://reviews.llvm.org/D101297
More information about the llvm-commits
mailing list