Skip to content

[SLPVectorizer] Assertion failure: vector_insert parameters must have the same element type #105783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dtcxzyw opened this issue Aug 23, 2024 · 1 comment

Comments

@dtcxzyw
Copy link
Member

dtcxzyw commented Aug 23, 2024

Reproducer:

; bin/opt -passes=slp-vectorizer reduced.ll -S
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define i1 @main() {
entry:
  %conv57.us.us.us736.us.1.i = trunc i64 0 to i32
  %cond.i.us.us.us737.us.1.i = tail call i32 @llvm.smax.i32(i32 %conv57.us.us.us736.us.1.i, i32 0)
  %cmp60.us.us.us738.us.1.i = icmp slt i32 %cond.i.us.us.us737.us.1.i, 0
  %conv57.us.us.us736.us.2.i = trunc i64 0 to i32
  %cond.i.us.us.us737.us.2.i = tail call i32 @llvm.smax.i32(i32 %conv57.us.us.us736.us.2.i, i32 0)
  %cmp60.us.us.us738.us.2.i = icmp slt i32 %cond.i.us.us.us737.us.2.i, 0
  %arrayidx56.us.us.us735.us.2.1.i = getelementptr [10 x [5 x [5 x i64]]], ptr null, i64 0, i64 0, i64 1, i64 2
  %0 = load i64, ptr %arrayidx56.us.us.us735.us.2.1.i, align 8
  %conv57.us.us.us736.us.2.1.i = trunc i64 %0 to i32
  %cond.i.us.us.us737.us.2.1.i = tail call i32 @llvm.smax.i32(i32 %conv57.us.us.us736.us.2.1.i, i32 0)
  %cmp60.us.us.us738.us.2.1.i = icmp slt i32 %cond.i.us.us.us737.us.2.1.i, 0
  %arrayidx56.us.us.us735.us.3.1.i = getelementptr [10 x [5 x [5 x i64]]], ptr null, i64 0, i64 0, i64 1, i64 1
  %1 = load i64, ptr %arrayidx56.us.us.us735.us.3.1.i, align 8
  %conv57.us.us.us736.us.3.1.i = trunc i64 %1 to i32
  %cond.i.us.us.us737.us.3.1.i = tail call i32 @llvm.smax.i32(i32 %conv57.us.us.us736.us.3.1.i, i32 0)
  %cmp60.us.us.us738.us.3.1.i = icmp slt i32 %cond.i.us.us.us737.us.3.1.i, 0
  ret i1 %cmp60.us.us.us738.us.3.1.i
}
vector_insert parameters must have the same element type.
  %1 = call <4 x i32> @llvm.vector.insert.v4i32.v2i64(<4 x i32> <i32 poison, i32 poison, i32 0, i32 0>, <2 x i64> %0, i64 0)
LLVM ERROR: Broken module found, compilation aborted!
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 -passes=slp-vectorizer reduced.ll -S
1.      Running pass "verify" on module "reduced.ll"
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  libLLVMSupport.so.20.0git   0x00007aac30a12be2 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 66
1  libLLVMSupport.so.20.0git   0x00007aac30a0faaf llvm::sys::RunSignalHandlers() + 47
2  libLLVMSupport.so.20.0git   0x00007aac30a0fbf5
3  libc.so.6                   0x00007aac30442520
4  libc.so.6                   0x00007aac304969fc pthread_kill + 300
5  libc.so.6                   0x00007aac30442476 raise + 22
6  libc.so.6                   0x00007aac304287f3 abort + 211
7  libLLVMSupport.so.20.0git   0x00007aac3086c6a1
8  libLLVMSupport.so.20.0git   0x00007aac3091c1e0
9  libLLVMCore.so.20.0git      0x00007aac29195468
10 libLLVMOptDriver.so.20.0git 0x00007aac30b77525
11 libLLVMCore.so.20.0git      0x00007aac29150b2a llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 1434
12 libLLVMOptDriver.so.20.0git 0x00007aac30b84fb7 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) + 8631
13 libLLVMOptDriver.so.20.0git 0x00007aac30b90952 optMain + 10594
14 libc.so.6                   0x00007aac30429d90
15 libc.so.6                   0x00007aac30429e40 __libc_start_main + 128
16 opt                         0x000063015e8e1095 _start + 37
Aborted (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants