[Mlir-commits] [mlir] [mlir][spirv] Verify vector types when parsing (PR #180430)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Feb 9 04:53:15 PST 2026
================
@@ -186,12 +186,23 @@ static Type parseAndVerifyType(SPIRVDialect const &dialect,
parser.emitError(typeLoc, "only 1-D vector allowed but found ") << t;
return Type();
}
+ if (t.getNumElements() < 2) {
+ parser.emitError(typeLoc, "SPIR-V does not allow one-element vectors");
+ return Type();
+ }
if (t.getNumElements() > 4) {
----------------
kuhar wrote:
Yeah vector size verification will have to be reworked to allow for long vectors in the future, so that we don't immediately error out
https://github.com/llvm/llvm-project/pull/180430
More information about the Mlir-commits
mailing list