================
@@ -1694,6 +1698,84 @@ bool SPIRVInstructionSelector::selectIntegerDot(Register 
ResVReg,
   return Result;
 }
 
+// Since pre-1.6 SPIRV has no DotProductInput4x8BitPacked implementation,
+// extract the elements of the packed inputs, multiply them and add the result
+// to the accumulator.
----------------
s-perron wrote:
This is less efficient code. We should look to see if the instruction is 
available by checking if the you are targeting spirv1.6 or higher, or the 
[SPV_KHR_integer_dot_product](https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_integer_dot_product.html)
 extension is enabled. You can get this information from the `SPIRVSubTarget`. 
I believe it is a member of `SPIRVInstructionSelector` and it is called `STI`.

`STI->canUseExtension(...)`
`STI->isAtLeastSPIRVVer(...)`

https://github.com/llvm/llvm-project/pull/113623
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to