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

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 10:43:53 PDT 2022


ABataev added a comment.

In D107966#3620735 <https://reviews.llvm.org/D107966#3620735>, @vdmitrie wrote:

> 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

Hi Valery, thanks for the report, will prepare the fix later today or tomorrow


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