Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/OpIAdd.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 "testIAdd"
10 OpName %a "a"
11 OpName %b "b"
12 OpName %r1 "r1"
13 OpName %r2 "r2"
14 OpName %r3 "r3"
15 OpName %r4 "r4"
16 OpDecorate %r2 NoSignedWrap
17 OpDecorate %r3 NoUnsignedWrap
18 OpDecorate %r4 NoSignedWrap
19 OpDecorate %r4 NoUnsignedWrap
20 %void = OpTypeVoid
21 %uint = OpTypeInt 32 0
22 %5 = OpTypeFunction %void %uint %uint
23 %1 = OpFunction %void None %5
24 %a = OpFunctionParameter %uint
25 %b = OpFunctionParameter %uint
26 %6 = OpLabel
27 %r1 = OpIAdd %uint %a %b
28 %r2 = OpIAdd %uint %a %b
29 %r3 = OpIAdd %uint %a %b
30 %r4 = OpIAdd %uint %a %b
31 OpReturn
32 OpFunctionEnd
33
34 ; CHECK: %r1 = add i32 %a, %b
35 ; CHECK: %r2 = add nsw i32 %a, %b
36 ; CHECK: %r3 = add nuw i32 %a, %b
37 ; CHECK: %r4 = add nuw nsw i32 %a, %b