| Issue |
178275
|
| Summary |
Assertion failure in llvm.vector.deinterleave3 with invalid element count
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
sairam2661
|
**Fuzzer Generated Test**
**Reproducer**
https://godbolt.org/z/9nKr7KEjh
**Description**
The `llvm.vector.deinterleave3` intrinsic triggers a compiler crash during validation if the input vector length is not a multiple of three, failing an internal `VectorType` assertion.
**Steps to reproduce**
- Test case, `input.ll`
```LLVM
define { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @test(<vscale x 8 x i8> %ptr) local_unnamed_addr {
%v = tail call { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } @llvm.vector.deinterleave3.nxv6i32(<vscale x 8 x i8> %ptr)
ret { <vscale x 2 x i32>, <vscale x 2 x i32>, <vscale x 2 x i32> } %v
}
```
**Command**
```LLVM
opt -passes=default<O2> -S input.ll
```
**Output**
```LLVM
opt: /root/llvm-project/llvm/include/llvm/IR/DerivedTypes.h:547: static llvm::VectorType* llvm::VectorType::getOneNthElementsVectorType(llvm::VectorType*, unsigned int): Assertion `EltCnt.isKnownMultipleOf(Denominator) && "Cannot take one-nth of a vector"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/opt -o /app/output.s -S --passes=default<O2> <source>
#0 0x0000000005aa00f8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x5aa00f8)
#1 0x0000000005a9cfd4 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#2 0x00007e390ce42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007e390ce969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x00007e390ce42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x00007e390ce287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00007e390ce2871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#7 0x00007e390ce39e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#8 0x0000000005756621 matchIntrinsicType(llvm::Type*, llvm::ArrayRef<llvm::Intrinsic::IITDescriptor>&, llvm::SmallVectorImpl<llvm::Type*>&, llvm::SmallVectorImpl<std::pair<llvm::Type*, llvm::ArrayRef<llvm::Intrinsic::IITDescriptor>>>&, bool) (.part.0) Intrinsics.cpp:0:0
#9 0x0000000005756d0c llvm::Intrinsic::getIntrinsicSignature(unsigned int, llvm::FunctionType*, llvm::SmallVectorImpl<llvm::Type*>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x5756d0c)
#10 0x0000000005422dbc llvm::LLParser::validateEndOfModule(bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x5422dbc)
#11 0x000000000545b18b llvm::LLParser::Run(bool, llvm::function_ref<std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> (llvm::StringRef, llvm::StringRef)>) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x545b18b)
#12 0x0000000005403d47 parseAssemblyInto(llvm::MemoryBufferRef, llvm::Module*, llvm::ModuleSummaryIndex*, llvm::SMDiagnostic&, llvm::SlotMapping*, bool, llvm::function_ref<std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> (llvm::StringRef, llvm::StringRef)>, llvm::AsmParserContext*) Parser.cpp:0:0
#13 0x0000000005403ef1 llvm::parseAssembly(llvm::MemoryBufferRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::SlotMapping*, llvm::function_ref<std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> (llvm::StringRef, llvm::StringRef)>, llvm::AsmParserContext*) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x5403ef1)
#14 0x00000000053fed81 llvm::parseIR(llvm::MemoryBufferRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::ParserCallbacks, llvm::AsmParserContext*) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x53fed81)
#15 0x0000000005400fa4 llvm::parseIRFile(llvm::StringRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::ParserCallbacks, llvm::AsmParserContext*) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x5400fa4)
#16 0x0000000000960673 optMain (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x960673)
#17 0x00007e390ce29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#18 0x00007e390ce29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#19 0x0000000000959825 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x959825)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs