Files
OpenCL-CTS/test_conformance/spirv_new/spirv_asm/branch_conditional.spvasm32
Sven van Haastregt 0abec2f49a spirv_new: remove invalid Aligned 0 decorations (#2360)
After https://github.com/KhronosGroup/SPIRV-Tools/pull/6027 spirv-val is
now rejecting `Aligned 0` Memory Operands. This causes the spirv_new
test binary to no longer build with a recent SPIRV-Tools version.

Mechanically remove all occurrences of `Aligned 0` in the SPIR-V
assembly files.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2025-04-08 17:49:00 +01:00

58 lines
2.4 KiB
Plaintext

; SPIR-V
; Version: 1.0
; Generator: Khronos SPIR-V Tools Assembler; 0
; Bound: 32
; Schema: 0
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %1 "branch_conditional" %gl_GlobalInvocationID
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpDecorate %5 FuncParamAttr NoCapture
%5 = OpDecorationGroup
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
OpDecorate %gl_GlobalInvocationID Constant
OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %5 %res %lhs %rhs
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%bool = OpTypeBool
%void = OpTypeVoid
%uint_0 = OpConstant %uint 0
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%15 = OpTypeFunction %void %_ptr_CrossWorkgroup_uint %_ptr_CrossWorkgroup_uint %_ptr_CrossWorkgroup_uint
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
%1 = OpFunction %void None %15
%res = OpFunctionParameter %_ptr_CrossWorkgroup_uint
%lhs = OpFunctionParameter %_ptr_CrossWorkgroup_uint
%rhs = OpFunctionParameter %_ptr_CrossWorkgroup_uint
%16 = OpLabel
%17 = OpVariable %_ptr_Function_uint Function
%18 = OpLoad %v3uint %gl_GlobalInvocationID
%19 = OpCompositeExtract %uint %18 0
%20 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %lhs %19
%21 = OpLoad %uint %20 Aligned 4
%22 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %rhs %19
%23 = OpLoad %uint %22 Aligned 4
%24 = OpULessThan %bool %21 %23
OpBranchConditional %24 %25 %26
%25 = OpLabel
%27 = OpISub %uint %23 %21
OpStore %17 %27
OpBranch %28
%26 = OpLabel
%29 = OpISub %uint %21 %23
OpStore %17 %29
OpBranch %28
%28 = OpLabel
%30 = OpLoad %uint %17
%31 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uint %res %19
OpStore %31 %30 Aligned 4
OpReturn
OpFunctionEnd