================
@@ -1978,8 +2002,10 @@ SPIRVTypeInst 
SPIRVGlobalRegistry::getOrCreateSPIRVVectorType(
   MachineIRBuilder MIRBuilder(*DepMI->getParent(), DepMI->getIterator());
   const MachineInstr *NewMI = createConstOrTypeAtFunctionEntry(
       MIRBuilder, [&](MachineIRBuilder &MIRBuilder) {
+        auto OpTy =
+            (isLongVector(Ty)) ? SPIRV::OpTypeVectorIdEXT : 
SPIRV::OpTypeVector;
----------------
jmmartinez wrote:

In `SPIRVGlobalRegistry::getOpTypeVectorImpl` we use `SPIRV::OpTypeVectorIdEXT` 
if the extension is available. In here we use the `N != 2 && N != 3 && N != 4 
&& N != 8 && N != 16` condition.

Can we always use `SPIRV::OpTypeVectorIdEXT` if the extension is available? Or, 
should we also take into account the number of elements of the vector in 
`SPIRVGlobalRegistry::getOpTypeVectorImpl`? I personally prefer the first 
alternative.

https://github.com/llvm/llvm-project/pull/210279
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to