[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
================
@@ -349,13 +347,30 @@ SPIRVGlobalRegistry::getOpTypeVector(uint32_t NumElems, SPIRVTypeInst ElemType,
return createConstOrTypeAtFunctionEntry(
MIRBuilder, [&](MachineIRBuilder &MIRBuilder) {
- return MIRBuilder.buildInstr(SPIRV::OpTypeVector)
+ return MIRBuilder
+ .buildInstr(IsLongVector ? SPIRV::OpTypeVectorIdEXT
----------------
maarquitos14 wrote:
I'm hesitant that `IsLongVector` is the best name for this. If I read the spec correctly, a 1-element vector needs the extension. At the same time, I understand that this maps directly to the spec extension name, which is indeed `SPV_EXT_long_vector`. Maybe `IsLongVectorExt` instead?
https://github.com/llvm/llvm-project/pull/210279
More information about the cfe-commits
mailing list