-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]mlir:spirv
Description
MLIR built at commit a5ddd920
Reproduced with:
mlir-opt --convert-spirv-to-llvm temp.mlir
temp.mlir
:
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @func(%arg0: !spirv.ptr<!spirv.matrix<3 x vector<3xf32>>, Function>, %arg1: i32) -> !spirv.ptr<vector<3xf32>, Function> "None" {
%0 = spirv.AccessChain %arg0[%arg1] : !spirv.ptr<!spirv.matrix<3 x vector<3xf32>>, Function>, i32
spirv.ReturnValue %0 : !spirv.ptr<vector<3xf32>, Function>
}
}
trace:
Assertion failed: (pointee && "expected non-null subtype, pass the context instead if " "the opaque pointer type is desired"), function get, file LLVMTypes.cpp, line 251.
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 --convert-spirv-to-llvm 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 0x00000001003485bc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 mlir-opt 0x0000000100347624 llvm::sys::RunSignalHandlers() + 112
2 mlir-opt 0x0000000100348c54 SignalHandler(int) + 344
3 libsystem_platform.dylib 0x00000001a56894c4 _sigtramp + 56
4 libsystem_pthread.dylib 0x00000001a5671ee0 pthread_kill + 288
5 libsystem_c.dylib 0x00000001a55ac340 abort + 168
6 libsystem_c.dylib 0x00000001a55ab754 err + 0
7 mlir-opt 0x0000000101a2d9b0 mlir::LLVM::LLVMPointerType::verify(llvm::function_ref<mlir::InFlightDiagnostic ()>, mlir::Type, unsigned int) (.cold.1) + 0
8 mlir-opt 0x00000001009d6db8 mlir::LLVM::LLVMPointerType::verify(llvm::function_ref<mlir::InFlightDiagnostic ()>, mlir::Type, unsigned int) + 0
9 mlir-opt 0x0000000101278ddc std::__1::__function::__func<std::__1::enable_if<std::is_invocable_v<mlir::populateSPIRVToLLVMTypeConversion(mlir::LLVMTypeConverter&)::$_3, mlir::spirv::PointerType, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>>, std::__1::function<std::__1::optional<mlir::LogicalResult> (mlir::Type, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>)>>::type mlir::TypeConverter::wrapCallback<mlir::spirv::PointerType, std::__1::enable_if<std::is_invocable_v<mlir::populateSPIRVToLLVMTypeConversion(mlir::LLVMTypeConverter&)::$_3, mlir::spirv::PointerType>, std::__1::function<std::__1::optional<mlir::LogicalResult> (mlir::Type, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>)>>::type mlir::TypeConverter::wrapCallback<mlir::spirv::PointerType, mlir::populateSPIRVToLLVMTypeConversion(mlir::LLVMTypeConverter&)::$_3>(mlir::populateSPIRVToLLVMTypeConversion(mlir::LLVMTypeConverter&)::$_3&&)::'lambda'(mlir::spirv::PointerType, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>)>(mlir::populateSPIRVToLLVMTypeConversion(mlir::LLVMTypeConverter&)::$_3&&)::'lambda'(mlir::Type, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>), std::__1::allocator<std::__1::enable_if<std::is_invocable_v<mlir::populateSPIRVToLLVMTypeConversion(mlir::LLVMTypeConverter&)::$_3, mlir::spirv::PointerType, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>>, std::__1::function<std::__1::optional<mlir::LogicalResult> (mlir::Type, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>)>>::type mlir::TypeConverter::wrapCallback<mlir::spirv::PointerType, std::__1::enable_if<std::is_invocable_v<mlir::populateSPIRVToLLVMTypeConversion(mlir::LLVMTypeConverter&)::$_3, mlir::spirv::PointerType>, std::__1::function<std::__1::optional<mlir::LogicalResult> (mlir::Type, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>)>>::type mlir::TypeConverter::wrapCallback<mlir::spirv::PointerType, mlir::populateSPIRVToLLVMTypeConversion(mlir::LLVMTypeConverter&)::$_3>(mlir::populateSPIRVToLLVMTypeConversion(mlir::LLVMTypeConverter&)::$_3&&)::'lambda'(mlir::spirv::PointerType, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>)>(mlir::populateSPIRVToLLVMTypeConversion(mlir::LLVMTypeConverter&)::$_3&&)::'lambda'(mlir::Type, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>)>, std::__1::optional<mlir::LogicalResult> (mlir::Type, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>)>::operator()(mlir::Type&&, llvm::SmallVectorImpl<mlir::Type>&, llvm::ArrayRef<mlir::Type>&&) + 84
10 mlir-opt 0x00000001015869e4 mlir::TypeConverter::convertType(mlir::Type, llvm::SmallVectorImpl<mlir::Type>&) + 764
11 mlir-opt 0x000000010158b0f4 mlir::TypeConverter::convertType(mlir::Type) + 64
12 mlir-opt 0x00000001011a3cbc mlir::structFuncArgTypeConverter(mlir::LLVMTypeConverter&, mlir::Type, llvm::SmallVectorImpl<mlir::Type>&) + 100
13 mlir-opt 0x00000001011a3ae8 mlir::LLVMTypeConverter::convertFunctionSignature(mlir::FunctionType, bool, mlir::TypeConverter::SignatureConversion&) + 160
14 mlir-opt 0x0000000101298a24 (anonymous namespace)::FuncConversionPattern::matchAndRewrite(mlir::spirv::FuncOp, mlir::spirv::FuncOpAdaptor, mlir::ConversionPatternRewriter&) const + 156
15 mlir-opt 0x0000000100ebbc04 mlir::OpConversionPattern<mlir::spirv::FuncOp>::matchAndRewrite(mlir::Operation*, llvm::ArrayRef<mlir::Value>, mlir::ConversionPatternRewriter&) const + 144
16 mlir-opt 0x000000010158ae34 mlir::ConversionPattern::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const + 200
17 mlir-opt 0x00000001017e7bd0 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&)>) + 1440
18 mlir-opt 0x00000001015954b0 (anonymous namespace)::OperationLegalizer::legalize(mlir::Operation*, mlir::ConversionPatternRewriter&) + 1948
19 mlir-opt 0x000000010158eb1c (anonymous namespace)::OperationConverter::convertOperations(llvm::ArrayRef<mlir::Operation*>, llvm::function_ref<void (mlir::Diagnostic&)>) + 928
20 mlir-opt 0x0000000101590d18 mlir::applyPartialConversion(mlir::Operation*, mlir::ConversionTarget&, mlir::FrozenRewritePatternSet const&, llvm::DenseSet<mlir::Operation*, llvm::DenseMapInfo<mlir::Operation*, void>>*) + 80
21 mlir-opt 0x0000000101299c20 (anonymous namespace)::ConvertSPIRVToLLVMPass::runOnOperation() + 600
22 mlir-opt 0x00000001015534dc mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) + 420
23 mlir-opt 0x0000000101553a0c mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) + 320
24 mlir-opt 0x0000000101555388 mlir::PassManager::run(mlir::Operation*) + 1148
25 mlir-opt 0x000000010154e840 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
26 mlir-opt 0x000000010154e410 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
27 mlir-opt 0x00000001015b902c 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
28 mlir-opt 0x000000010154c838 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
29 mlir-opt 0x000000010154cd2c mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&, bool) + 1208
30 mlir-opt 0x00000001001eb0a0 main + 108
31 dyld 0x0000000104abd088 start + 516
Metadata
Metadata
Assignees
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]mlir:spirv