aboutsummaryrefslogtreecommitdiff
path: root/test_conformance/spirv_new/spirv_asm/op_neg_half.spvasm64
diff options
context:
space:
mode:
Diffstat (limited to 'test_conformance/spirv_new/spirv_asm/op_neg_half.spvasm64')
-rw-r--r--test_conformance/spirv_new/spirv_asm/op_neg_half.spvasm6439
1 files changed, 39 insertions, 0 deletions
diff --git a/test_conformance/spirv_new/spirv_asm/op_neg_half.spvasm64 b/test_conformance/spirv_new/spirv_asm/op_neg_half.spvasm64
new file mode 100644
index 00000000..9c7e3d6d
--- /dev/null
+++ b/test_conformance/spirv_new/spirv_asm/op_neg_half.spvasm64
@@ -0,0 +1,39 @@
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos SPIR-V Tools Assembler; 0
+; Bound: 20
+; Schema: 0
+ OpCapability Addresses
+ OpCapability Linkage
+ OpCapability Kernel
+ OpCapability Int64
+ OpCapability Float16
+ OpMemoryModel Physical64 OpenCL
+ OpEntryPoint Kernel %1 "op_neg_half" %gl_GlobalInvocationID
+ OpName %in "in"
+ OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
+ OpDecorate %gl_GlobalInvocationID Constant
+ OpDecorate %in FuncParamAttr NoCapture
+ OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import
+ %ulong = OpTypeInt 64 0
+ %v3ulong = OpTypeVector %ulong 3
+%_ptr_Input_v3ulong = OpTypePointer Input %v3ulong
+ %void = OpTypeVoid
+ %half = OpTypeFloat 16
+%_ptr_CrossWorkgroup_half = OpTypePointer CrossWorkgroup %half
+ %10 = OpTypeFunction %void %_ptr_CrossWorkgroup_half
+ %ulong_32 = OpConstant %ulong 32
+%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3ulong Input
+ %1 = OpFunction %void None %10
+ %in = OpFunctionParameter %_ptr_CrossWorkgroup_half
+ %12 = OpLabel
+ %13 = OpLoad %v3ulong %gl_GlobalInvocationID Aligned 0
+ %14 = OpCompositeExtract %ulong %13 0
+ %15 = OpShiftLeftLogical %ulong %14 %ulong_32
+ %16 = OpShiftRightArithmetic %ulong %15 %ulong_32
+ %17 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_half %in %16
+ %18 = OpLoad %half %17
+ %19 = OpFNegate %half %18
+ OpStore %17 %19
+ OpReturn
+ OpFunctionEnd