Debian Codegraph @

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_function_pointers/fp_cmp.ll

raw
1 ; RUN: llc -verify-machineinstrs -O0 --spirv-ext=+SPV_INTEL_function_pointers %s -o - | FileCheck %s
2 ; TODO: %if spirv-tools %{ llc -O0 %s -o - -filetype=obj | spirv-val %}
3
4 ; CHECK-DAG: OpCapability FunctionPointersINTEL
5 ; CHECK: OpExtension "SPV_INTEL_function_pointers"
6
7 ; CHECK: OpName %[[F1:.*]] "f1"
8 ; CHECK: OpName %[[ARG:.*]] "arg"
9
10 ; CHECK: %[[TyBool:.*]] = OpTypeBool
11
12 ; CHECK: %[[F1Ptr:.*]] = OpConstantFunctionPointerINTEL %{{.*}} %[[F1]]
13
14 ; CHECK: OpPtrEqual %[[TyBool]] %[[F1Ptr]] %[[ARG]]
15
16 target triple = "spirv64"
17
18 define spir_func void @f1() addrspace(9) {
19 entry:
20 ret void
21 }
22
23 define spir_func i1 @foo(ptr addrspace(9) %arg) addrspace(9) {
24 entry:
25 %a = icmp eq ptr addrspace(9) @f1, %arg
26 ret i1 %a
27 }