[llvm] [SPIR-V] Emit valid SPIR-V code for integer sizes other than 8,16,32,64 (PR #94219)

Vyacheslav Levytskyy via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 08:02:29 PDT 2024


================
@@ -10,7 +10,10 @@
 ; CHECK-SPIRV: OpCapability BitInstructions
 ; CHECK-SPIRV: OpExtension "SPV_KHR_bit_instructions"
 ; CHECK-SPIRV: %[[#CharTy:]] = OpTypeInt 8 0
-; CHECK-SPIRV: %[[#]] = OpBitReverse %[[#CharTy]] %[[#]]
+; CHECK-SPIRV-NO: %[[#CharTy:]] = OpTypeInt 8 0
+; CHECK-SPIRV: %[[#Arg:]] = OpFunctionParameter %[[#CharTy]]
+; CHECK-SPIRV: %[[#Res:]] = OpBitReverse %[[#CharTy]] %[[#Arg]]
----------------
VyacheslavLevytskyy wrote:

Thank you @Keenuts , you are right. The context is that I'm reworking this part of SPIR-V Backend gradually, fixing crashes and invalid code first. This PR is a continuation of https://github.com/llvm/llvm-project/pull/93699

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


More information about the llvm-commits mailing list