[PATCH] D114909: [SLP]Outline and fix code for finding common insertelement vectors.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 1 14:42:03 PST 2021


ABataev added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5460
     // to detect it as a final shuffled/identity match.
     if (isa_and_nonnull<InsertElementInst>(EU.User)) {
       if (auto *FTy = dyn_cast<FixedVectorType>(EU.User->getType())) {
----------------
RKSimon wrote:
> If this better?
> ```
> if (auto *VU = dyn_cast_or_null<InsertElementInst>(EU.User)) {
> ```
Yes, definitely!


================
Comment at: llvm/test/Transforms/SLPVectorizer/X86/cmp_commute.ll:3
 ; RUN: opt < %s -slp-vectorizer -instcombine -S -mtriple=x86_64--- -mattr=+sse2 | FileCheck %s
 ; RUN: opt < %s -slp-vectorizer -instcombine -S -mtriple=x86_64--- -mattr=+avx  | FileCheck %s
 
----------------
RKSimon wrote:
> looks like you need to add --check-prefixes=CHECK,SSE + --check-prefixes=CHECK,AVX
Yep, forgot to update, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114909



More information about the llvm-commits mailing list