[Mlir-commits] [mlir] [MLIR] [SPIR-V] Verify element type in SPIR-V's vector-type verifier (PR #177787)

Gabriel Dehame llvmlistbot at llvm.org
Sun Jan 25 09:45:22 PST 2026


================
@@ -186,6 +186,13 @@ static Type parseAndVerifyType(SPIRVDialect const &dialect,
       parser.emitError(typeLoc, "only 1-D vector allowed but found ") << t;
       return Type();
     }
+    if (!isa<ScalarType>(t.getElementType())) {
+      parser.emitError(typeLoc,
+                       "vector element type has to be SPIR-V compatible "
+                       "integer, float or boolean but found ")
----------------
gdehame wrote:

Done

https://github.com/llvm/llvm-project/pull/177787


More information about the Mlir-commits mailing list