Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/OpFMod_v2f16.spvasm

raw
1 ; REQUIRES: spirv-as
2 ; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
3 ; RUN: spirv-val %t.spv
4 ; RUN: llvm-spirv -r -emit-opaque-pointers -o - %t.spv | llvm-dis | FileCheck %s
5 OpCapability Addresses
6 OpCapability Kernel
7 OpCapability Float16
8 OpMemoryModel Physical32 OpenCL
9 OpEntryPoint Kernel %1 "testFMod_v2f16"
10 OpName %a "a"
11 OpName %b "b"
12 %void = OpTypeVoid
13 %half = OpTypeFloat 16
14 %half2 = OpTypeVector %half 2
15 %5 = OpTypeFunction %void %half2 %half2
16 %1 = OpFunction %void None %5
17 %a = OpFunctionParameter %half2
18 %b = OpFunctionParameter %half2
19 %6 = OpLabel
20 %7 = OpFMod %half2 %a %b
21 OpReturn
22 OpFunctionEnd
23
24 ; CHECK-DAG: %frem.res = frem <2 x half> %a, %b
25 ; CHECK-DAG: %copysign.res = call <2 x half> @llvm.copysign.v2f16(<2 x half> %frem.res, <2 x half> %b)
26 ; CHECK-DAG: %fadd.res = fadd <2 x half> {{%frem\.res, %b|%b, %frem\.res}}
27 ; CHECK-DAG: %cmp.res = fcmp one <2 x half> {{%frem\.res, %copysign\.res|%copysign\.res, %frem\.res}}
28 ; CHECK: select <2 x i1> %cmp.res, <2 x half> %fadd.res, <2 x half> %copysign.res