[PATCH] D156661: [SPIRV] Add support for SPV_KHR_bit_instructions
Ilia Diachkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 31 12:51:11 PDT 2023
iliya-diyachkov added a comment.
For such cases, we can use SPIRV translator as a reference tool. You can build it (https://github.com/KhronosGroup/SPIRV-LLVM-Translator) and run to see what output it generates. It also has a set of tests that we partly adopted for our backend, so you can use its test base to search for tests of some functionality and reuse them.
For example, they have test/transcoding/cl_khr_extended_bit_ops.cl for SPV_KHR_bit_instructions extension. Here is the beginning of SPIRV, which the translator outputs:
...
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Vector16
OpCapability Int64
OpCapability Int16
OpCapability Int8
OpCapability BitInstructions
OpExtension "SPV_KHR_bit_instructions"
%1 = OpExtInstImport "OpenCL.std"
...
There is no Shader capability but we have BitInstructions capability and SPV_KHR_bit_instructions extension (as you suggested).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156661/new/
https://reviews.llvm.org/D156661
More information about the llvm-commits
mailing list