| Issue |
178229
|
| Summary |
mlir-opt crashes on spirv.CompositeConstruct with vector operands
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
mlirBug
|
mlir-opt version: 22.1.0-rc1
1mlir-opt crashes with an assertion failure when processing a `spirv.CompositeConstruct` operation. The crash occurs because the pass internally casts operand types to `spirv::CompositeType`, but the operand types do not satisfy this assumption, causing a hard abort.
```
mlir-opt test.mlir
```
```
module {
func.func @main() {
%0 = vector.constant_mask [1, 1] : vector<2x2xi1>
%1 = smt.declare_fun : !smt.sort<"uninterpreted0">
%2 = spirv.CompositeConstruct %0, %0 : (vector<2x2xi1>, vector<2x2xi1>) -> vector<2x4xi1>
return
}
}
```
```
mlir-opt: llvm-project-llvmorg-22.1.0-rc1/llvm/include/llvm/Support/Casting.h:560: decltype(auto) llvm::cast(const From&) [with To = mlir::spirv::CompositeType; From = mlir::Type]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' 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: llvmorg-22.1.0-install/bin/mlir-opt test.mlir
#0 0x00005c08b006ae32 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (llvmorg-22.1.0-install/bin/mlir-opt+0x252fe32)
#1 0x00005c08b00675af llvm::sys::RunSignalHandlers() (llvmorg-22.1.0-install/bin/mlir-opt+0x252c5af)
#2 0x00005c08b00676fc SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x0000724ab5845330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
#4 0x0000724ab589eb2c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#5 0x0000724ab589eb2c __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#6 0x0000724ab589eb2c pthread_kill ./nptl/pthread_kill.c:89:10
#7 0x0000724ab584527e raise ./signal/../sysdeps/posix/raise.c:27:6
#8 0x0000724ab58288ff abort ./stdlib/abort.c:81:7
#9 0x0000724ab582881b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x0000724ab583b517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
#11 0x00005c08b41a0f04 mlir::spirv::CompositeConstructOp::verify() (llvmorg-22.1.0-install/bin/mlir-opt+0x6665f04)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs