[clang] [llvm] [SPIRV] Add support for the `SPV_EXT_long_vector` extension (PR #210279)

Marcos Maronas via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 17 07:49:28 PDT 2026


================
@@ -3232,9 +3248,10 @@ bool SPIRVInstructionSelector::selectIntegerDotExpansion(
       .addUse(Vec1)
       .constrainAllUses(TII, TRI, RBI);
 
-  assert(VecType->getOpcode() == SPIRV::OpTypeVector &&
-         GR.getScalarOrVectorComponentCount(VecType) > 1 &&
-         "dot product requires a vector of at least 2 components");
+  assert((VecType->getOpcode() == SPIRV::OpTypeVector &&
+          GR.getScalarOrVectorComponentCount(VecType) > 1) ||
+         VecType->getOpcode() == SPIRV::OpTypeVectorIdEXT &&
+             "dot product requires a vector of at least 2 components");
----------------
maarquitos14 wrote:

The message seems a bit misleading now. We accept vectors of 1 component if the extension is enabled.

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


More information about the cfe-commits mailing list