Issue 60214
Summary [mlir] `BubbleUpBitCastForStridedSliceInsert::matchAndRewrite` crashes with Assertion Failure "!empty()"
Labels
Assignees
Reporter Colloportus0
    MLIR built at commit https://github.com/llvm/llvm-project/commit/a0dab4950
Reproduced with: 
`mlir-opt --test-vector-to-vector-lowering temp.mlir`

temp.mlir:
``` milr 
func.func @func(%arg0: vector<f32>) -> vector<i32> {
  %0 = vector.bitcast %arg0 : vector<f32> to vector<i32>
  return %0 : vector<i32>
}
```
 
trace:
```console  
Assertion failed: (!empty()), function back, file ArrayRef.h, line 173.
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-vector-to-vector-lowering temp.mlir
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  mlir-opt 0x00000001008106b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  mlir-opt                 0x000000010080f720 llvm::sys::RunSignalHandlers() + 112
2  mlir-opt 0x0000000100810d50 SignalHandler(int) + 344
3  libsystem_platform.dylib 0x00000001aad414c4 _sigtramp + 56
4  libsystem_pthread.dylib 0x00000001aad29ee0 pthread_kill + 288
5  libsystem_c.dylib 0x00000001aac64340 abort + 168
6  libsystem_c.dylib 0x00000001aac63754 err + 0
7  mlir-opt                 0x00000001024f4a18 BubbleUpBitCastForStridedSliceInsert::matchAndRewrite(mlir::vector::BitCastOp, mlir::PatternRewriter&) const (.cold.4) + 0
8  mlir-opt 0x00000001018d3304 BubbleUpBitCastForStridedSliceInsert::matchAndRewrite(mlir::vector::BitCastOp, mlir::PatternRewriter&) const + 1496
9  mlir-opt 0x000000010212bb9c mlir::PatternApplicator::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&, llvm::function_ref<bool (mlir::Pattern const&)>, llvm::function_ref<void (mlir::Pattern const&)>, llvm::function_ref<mlir::LogicalResult (mlir::Pattern const&)>) + 1420
10 mlir-opt                 0x0000000101edb918 mlir::applyPatternsAndFoldGreedily(llvm::MutableArrayRef<mlir::Region>, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig) + 3976
11 mlir-opt                 0x0000000101e5c330 (anonymous namespace)::TestVectorToVectorLowering::runOnOperation() + 696
12 mlir-opt 0x0000000101e8c428 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 428
13 mlir-opt 0x0000000101e8c958 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 320
14 mlir-opt                 0x0000000101e909dc mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14::operator()(mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo&) const + 176
15 mlir-opt                 0x0000000101e90858 mlir::LogicalResult mlir::failableParallelForEach<std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&>(mlir::MLIRContext*, std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, std::__1::__wrap_iter<mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::OpPMInfo*>, mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool)::$_14&) + 360
16 mlir-opt                 0x0000000101e8d620 mlir::detail::OpToOpPassAdaptor::runOnOperationAsyncImpl(bool) + 1396
17 mlir-opt                 0x0000000101e8c558 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 732
18 mlir-opt 0x0000000101e8c958 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 320
19 mlir-opt                 0x0000000101e8e2d4 mlir::PassManager::run(mlir::Operation*) + 1148
20 mlir-opt 0x0000000101e87698 performActions(llvm::raw_ostream&, bool, bool, std::__1::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, bool, bool) + 504
21 mlir-opt                 0x0000000101e87268 mlir::LogicalResult llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool)::$_0>(long, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) + 704
22 mlir-opt                 0x0000000101ef1f5c mlir::splitAndProcessBuffer(std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, bool, bool) + 656
23 mlir-opt 0x0000000101e85690 mlir::MlirOptMain(llvm::raw_ostream&, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<mlir::LogicalResult (mlir::PassManager&)>, mlir::DialectRegistry&, bool, bool, bool, bool, bool, bool, bool) + 216
24 mlir-opt                 0x0000000101e85b84 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&, bool) + 1208
25 mlir-opt 0x00000001006b2ae4 main + 108
26 dyld 0x0000000105715088 start + 516

```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to