Issue |
131770
|
Summary |
[MLIR] crahsed on `-test-spirv-func-signature-conversion` pass: Assertion `succeeded(result) && "expected ConstantLike op to be foldable"' failed.
|
Labels |
mlir
|
Assignees |
|
Reporter |
sweead
|
test commit: [bd1be8a](https://github.com/llvm/llvm-project/commit/bd1be8a242384d98ef2087f4571b464e01501f5a)
step to reproduce:
`
mlir-opt test.mlir --test-spirv-func-signature-conversion
`
test case:
```
module {
func.func private @async_dispatch_fn(%arg0: !async.group, %arg1: index, %arg2: index, %arg3: index, %arg4: index, %arg5: index, %arg6: index, %arg7: index, %arg8: memref<4x3x2xi1, strided<[?, ?, ?], offset: ?>>, %arg9: memref<4x2xi1>, %arg10: index, %arg11: index, %arg12: index, %arg13: index) {
%c1 = arith.constant 1 : index
%c2 = arith.constant 2 : index
%0:2 = scf.while (%arg14 = %arg1, %arg15 = %arg2) : (index, index) -> (index, index) {
%1 = arith.subi %arg15, %arg14 : index
%2 = arith.cmpi sgt, %1, %c1 : index
scf.condition(%2) %arg14, %arg15 : index, index
} do {
^bb0(%arg14: index, %arg15: index):
%1 = arith.subi %arg15, %arg14 : index
%2 = arith.divsi %1, %c2 : index
%3 = arith.addi %arg14, %2 : index
%token = async.execute {
func.call @async_dispatch_fn(%arg0, %3, %arg15, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8, %arg9, %arg10, %arg11, %arg12, %arg13) : (!async.group, index, index, index, index, index, index, index, memref<4x3x2xi1, strided<[?, ?, ?], offset: ?>>, memref<4x2xi1>, index, index, index, index) -> ()
async.yield
}
scf.yield %arg14, %3 : index, index
}
return
}
}
```
Crash backtrace:
```
mlir-opt: /home/workdir/llvm-project/mlir/include/mlir/IR/Matchers.h:93: bool mlir::detail::constant_op_binder<AttrT>::match(mlir::Operation*) [with AttrT = mlir::Attribute]: Assertion `succeeded(result) && "expected ConstantLike op to be foldable"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: mlir-opt test.mlir --test-spirv-func-signature-conversion
#0 0x000055fb489ba020 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/workdir/llvm-project/build/bin/mlir-opt+0x16ef020)
#1 0x000055fb489b6f2f llvm::sys::RunSignalHandlers() (/home/workdir/llvm-project/build/bin/mlir-opt+0x16ebf2f)
#2 0x000055fb489b707a SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f0642c90520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007f0642ce49fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x00007f0642c90476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x00007f0642c767f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x00007f0642c7671b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x00007f0642c87e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x000055fb4bb06053 mlir::Operation::fold(llvm::SmallVectorImpl<mlir::OpFoldResult>&) (/home/workdir/llvm-project/build/bin/mlir-opt+0x483b053)
#10 0x000055fb4b99b46c (anonymous namespace)::GreedyPatternRewriteDriver::processWorklist() GreedyPatternRewriteDriver.cpp:0:0
#11 0x000055fb4b99da3d mlir::applyPatternsGreedily(mlir::Region&, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig, bool*) (/home/workdir/llvm-project/build/bin/mlir-opt+0x46d2a3d)
#12 0x000055fb4d1d50c2 mlir::spirv::unrollVectorsInSignatures(mlir::Operation*) (/home/workdir/llvm-project/build/bin/mlir-opt+0x5f0a0c2)
#13 0x000055fb4b8e6201 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/home/workdir/llvm-project/build/bin/mlir-opt+0x461b201)
#14 0x000055fb4b8e66b1 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/home/workdir/llvm-project/build/bin/mlir-opt+0x461b6b1)
#15 0x000055fb4b8e7565 mlir::PassManager::run(mlir::Operation*) (/home/workdir/llvm-project/build/bin/mlir-opt+0x461c565)
#16 0x000055fb4b8d72f7 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#17 0x000055fb4b8d7dc5 processBuffer(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::MlirOptMainConfig const&, mlir::DialectRegistry&, llvm::ThreadPoolInterface*) MlirOptMain.cpp:0:0
#18 0x000055fb4b8d7f7d llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::'lambda'(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#19 0x000055fb4b9e09ae mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (/home/workdir/llvm-project/build/bin/mlir-opt+0x47159ae)
#20 0x000055fb4b8ceeac mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/home/workdir/llvm-project/build/bin/mlir-opt+0x4603eac)
#21 0x000055fb4b8d80e0 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/home/workdir/llvm-project/build/bin/mlir-opt+0x460d0e0)
#22 0x000055fb4b8d8607 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/home/workdir/llvm-project/build/bin/mlir-opt+0x460d607)
#23 0x000055fb488f9b5f main (/home/workdir/llvm-project/build/bin/mlir-opt+0x162eb5f)
#24 0x00007f0642c77d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#25 0x00007f0642c77e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#26 0x000055fb4898d865 _start (/home/workdir/llvm-project/build/bin/mlir-opt+0x16c2865)
Aborted (core dumped)
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs