[PATCH] D107966: [SLP]Do not emit extract elements for insertelements users, replace with shuffles directly.

Valeriy Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 16:31:09 PDT 2022


vdmitrie added a comment.

F23626866: reduced.ll <https://reviews.llvm.org/F23626866>

F23626884: patch.txt <https://reviews.llvm.org/F23626884>

There is another issue which I tracked down to this patch but it is kind of hidden. In order to reveal the issue please apply attached patch ( that is basically enabling expensive checks and added verifyFunction right after vectorized code generated.

Crash looks like this:
Instruction does not dominate all uses!

  %41 = insertelement <4 x i32> %40, i32 %32, i32 1
  %39 = insertelement <4 x i32> %41, i32 poison, i32 2

opt: /path/llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:8404: llvm::Value* llvm::slpvectorizer::BoUpSLP::vectorizeTree(): Assertion `!verifyFunction(*F, &dbgs()) && "Broken after vec"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: bin/opt -slp-vectorizer -mcpu=skylake -disable-output reduced.ll


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107966



More information about the llvm-commits mailing list