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