[PATCH] D101297: [SLP]Allow masked gathers only if allowed by target.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 27 05:45:54 PDT 2021


ABataev added inline comments.


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/pr47629.ll:376
+; AVX-NEXT:    [[TMP10:%.*]] = bitcast i32* [[T0:%.*]] to <8 x i32>*
+; AVX-NEXT:    store <8 x i32> [[TMP9]], <8 x i32>* [[TMP10]], align 4, !tbaa [[TBAA0]]
 ; AVX-NEXT:    ret void
----------------
spatel wrote:
> Seems like an improvement, but do you know what happens on this example? There's no masked gather, but that interfered with the cost calc for forming the vector add or store?
Yes, the target does not support masked gather and we overestimate the cost of the masked memory operations. Because of that, we could not vectorize this sequence previously. With legality checks, simple gather makes it profitable for 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