Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/OpSNegate.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 OpExtension "SPV_KHR_no_integer_wrap_decoration"
8 OpMemoryModel Physical32 OpenCL
9 OpEntryPoint Kernel %1 "testSNegate"
10 OpName %a "a"
11 OpName %r1 "r1"
12 OpName %r2 "r2"
13 OpDecorate %r2 NoSignedWrap
14 %void = OpTypeVoid
15 %uint = OpTypeInt 32 0
16 %5 = OpTypeFunction %void %uint
17 %1 = OpFunction %void None %5
18 %a = OpFunctionParameter %uint
19 %6 = OpLabel
20 %r1 = OpSNegate %uint %a
21 %r2 = OpSNegate %uint %a
22 OpReturn
23 OpFunctionEnd
24
25 ; CHECK: %r1 = sub i32 0, %a
26 ; CHECK: %r2 = sub nsw i32 0, %a