Closed
Description
git version: adf892d
system: Ubuntu 18.04.6 LTS
reproduce with: mlir-opt -generate-runtime-verification a.mlir
a.mlir:
func.func @memref_reinterpret_cast_incompatible_element_types(%in: memref<*xf32>) {
%out = memref.reinterpret_cast %in to
offset: [0], sizes: [10], strides: [1] : memref<*xf32> to memref<?xf32, strided<[?], offset:?>>
return
}
stack trace:
/data/szy/MLIR/seed/seed0/tmp.CINnXqXWtd.mlir:2:10: remark: location of op
%out = memref.reinterpret_cast %in to
^
LLVM ERROR: Failed to infer result type(s):
"memref.extract_strided_metadata"(...) {} : (memref<*xf32>) -> ( ??? )
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt -generate-runtime-verification /data/szy/MLIR/seed/seed0/tmp.CINnXqXWtd.mlir
#0 0x0000563a3d0bb048 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1188048)
#1 0x0000563a3d0b8b5e llvm::sys::RunSignalHandlers() (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1185b5e)
#2 0x0000563a3d0bb9dd SignalHandler(int) Signals.cpp:0:0
#3 0x00007f47c1ff2420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
#4 0x00007f47c162f00b raise /build/glibc-LcI20x/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
#5 0x00007f47c160e859 abort /build/glibc-LcI20x/glibc-2.31/stdlib/abort.c:81:7
#6 0x0000563a3d0db017 llvm::report_fatal_error(llvm::Twine const&, bool) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11a8017)
#7 0x0000563a3d0db04e (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11a804e)
#8 0x0000563a430ac177 (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x7179177)
#9 0x0000563a3e92a439 mlir::memref::ExtractStridedMetadataOp::build(mlir::OpBuilder&, mlir::OperationState&, mlir::Value) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x29f7439)
#10 0x0000563a3e9c0d58 mlir::memref::ExtractStridedMetadataOp mlir::OpBuilder::create<mlir::memref::ExtractStridedMetadataOp, mlir::detail::TypedValue<mlir::BaseMemRefType>&>(mlir::Location, mlir::detail::TypedValue<mlir::BaseMemRefType>&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x2a8dd58)
#11 0x0000563a3e9c0ab6 mlir::memref::(anonymous namespace)::computeLinearBounds(mlir::OpBuilder&, mlir::Location, mlir::detail::TypedValue<mlir::BaseMemRefType>) RuntimeOpVerification.cpp:0:0
#12 0x0000563a3e9c075f mlir::detail::RuntimeVerifiableOpInterfaceInterfaceTraits::FallbackModel<mlir::memref::(anonymous namespace)::ReinterpretCastOpInterface>::generateRuntimeVerification(mlir::detail::RuntimeVerifiableOpInterfaceInterfaceTraits::Concept const*, mlir::Operation*, mlir::OpBuilder&, mlir::Location) RuntimeOpVerification.cpp:0:0
#13 0x0000563a4051cebc void llvm::function_ref<void (mlir::Operation*)>::callback_fn<std::enable_if<!llvm::is_one_of<mlir::RuntimeVerifiableOpInterface, mlir::Operation*, mlir::Region*, mlir::Block*>::value && std::is_same<void, void>::value, void>::type mlir::detail::walk<(mlir::WalkOrder)1, mlir::ForwardIterator, (anonymous namespace)::GenerateRuntimeVerificationPass::runOnOperation()::$_0, mlir::RuntimeVerifiableOpInterface, void>(mlir::Operation*, (anonymous namespace)::GenerateRuntimeVerificationPass::runOnOperation()::$_0&&)::'lambda'(mlir::Operation*)>(long, mlir::Operation*) GenerateRuntimeVerification.cpp:0:0
#14 0x0000563a3d1d0ffe void mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<void (mlir::Operation*)>, mlir::WalkOrder) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x129dffe)
#15 0x0000563a3d1d0ffe void mlir::detail::walk<mlir::ForwardIterator>(mlir::Operation*, llvm::function_ref<void (mlir::Operation*)>, mlir::WalkOrder) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x129dffe)
#16 0x0000563a4051cd0a (anonymous namespace)::GenerateRuntimeVerificationPass::runOnOperation() GenerateRuntimeVerification.cpp:0:0
#17 0x0000563a404f77a6 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45c47a6)
#18 0x0000563a404f80d0 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45c50d0)
#19 0x0000563a404fa6a2 mlir::PassManager::run(mlir::Operation*) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45c76a2)
#20 0x0000563a404f2f4a performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#21 0x0000563a404f2b9d 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&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#22 0x0000563a4059ed75 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) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x466bd75)
#23 0x0000563a404ecb85 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45b9b85)
#24 0x0000563a404ece2f mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45b9e2f)
#25 0x0000563a404ed15e mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x45ba15e)
#26 0x0000563a3d09bb37 main (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x1168b37)
#27 0x00007f47c1610083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#28 0x0000563a3d09b6ae _start (/data/szy/MLIR/llvm-release/llvm-project/build/bin/mlir-opt+0x11686ae)