Debian Codegraph @

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

raw
1 ; Check support of OpCopyLogical instruction that was added in SPIR-V 1.4
2
3 ; REQUIRES: spirv-as
4 ; RUN: spirv-as --target-env spv1.4 -o %t.spv %s
5 ; RUN: spirv-val %t.spv
6 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.rev.bc
7 ; RUN: llvm-dis %t.rev.bc
8 ; RUN: FileCheck < %t.rev.ll %s --check-prefix=CHECK-LLVM
9 OpCapability Addresses
10 OpCapability Kernel
11 OpMemoryModel Physical32 OpenCL
12 OpEntryPoint Kernel %1 "test"
13 OpName %entry "entry"
14 %void = OpTypeVoid
15 %_struct_4 = OpTypeStruct
16 %_struct_5 = OpTypeStruct
17 %6 = OpConstantComposite %_struct_4
18 %7 = OpTypeFunction %void
19 %1 = OpFunction %void None %7
20 %entry = OpLabel
21 %8 = OpCopyLogical %_struct_5 %6
22 OpReturn
23 OpFunctionEnd
24
25 ; CHECK-LLVM: [[ALLOCA:%[a-z0-9.]+]] = alloca [[SRC_TYPE:%[a-z0-9.]+]], align 8
26 ; CHECK-LLVM: store [[SRC_TYPE]] zeroinitializer, ptr [[ALLOCA]], align 8
27 ; CHECK-LLVM: [[DST:%[a-z0-9.]+]] = load [[DST_TYPE:%[a-z0-9.]+]], ptr [[ALLOCA]], align 8