forked from KhronosGroup/SPIRV-LLVM-Translator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport to 14] [SPIR-V 1.4] Add CopyLogical instruction (KhronosGro…
…up#2484) There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation. This addresses p1. of KhronosGroup#2460 (cherry picked from commit 8518a6f)
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
; 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 -r %t.spv -o %t.rev.bc | ||
; RUN: llvm-dis %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: @_Z19__spirv_CopyLogical12structtype.0(ptr sret(%structtype) %[[#]], %structtype.0 zeroinitializer) |