llvm-project
59ba10b9 - [mlir][spirv] Fix crash when spirv.struct member type is not a SPIR-V type (#183942)

Commit
54 days ago
[mlir][spirv] Fix crash when spirv.struct member type is not a SPIR-V type (#183942) When parsing a spirv.struct type, any MLIR type was accepted as a member type without validation. This caused a crash in TypeExtensionVisitor and TypeCapabilityVisitor which unconditionally used cast<SPIRVType> on struct element types, asserting when a non-SPIR-V type (e.g., vector<2x2xi1>) was encountered. Fix the parser to reject non-SPIR-V member types with a proper error message. Fixes #179675
Author
Parents
Loading