[PATCH] D57059: [SLP] Initial support for the vectorization of the non-power-of-2 vectors.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 12:03:51 PST 2019


ABataev marked 3 inline comments as done.
ABataev added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:2298
+  Value *V0;
   Type *ScalarTy = VL[0]->getType();
+  VectorType *VecTy;
----------------
RKSimon wrote:
> Is it safe to use VL[0] like this - do we guarantee the undef types are correct?
Yes, the types must be the same.


================
Comment at: test/Transforms/SLPVectorizer/AArch64/PR38339.ll:16
+; CHECK-NEXT:    store i16 [[T3]], i16* [[PTR2]]
+; CHECK-NEXT:    store i16 [[T2]], i16* [[PTR3]]
 ; CHECK-NEXT:    ret void
----------------
RKSimon wrote:
> regression?
Cost model problem.


================
Comment at: test/Transforms/SLPVectorizer/X86/alternate-int.ll:590
+; AVX512-LABEL: @sdiv_v8i32_undefs(
+; AVX512-NEXT:    ret <8 x i32> undef
 ;
----------------
RKSimon wrote:
> This test is checking that the sdiv didn't get vectorized, because if any elt is undef then the whole result is undef - but if its stays scalarized then on elts 0 and 4 become undef.
Does it mean that we cannot replace the operands of sdiv with undefs and must replace them with, say, 1 instead?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57059/new/

https://reviews.llvm.org/D57059





More information about the llvm-commits mailing list