1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
3 define i8 @getConstantI8() {
7 define i16 @getConstantI16() {
11 define i32 @getConstantI32() {
15 define i64 @getConstantI64() {
19 define i64 @getLargeConstantI64() {
24 ; CHECK-DAG: OpCapability Int8
25 ; CHECK-DAG: OpCapability Int16
26 ; CHECK-DAG: OpCapability Int64
28 ; CHECK-NOT: DAG-FENCE
31 ; CHECK-DAG: OpName %[[#GET_I8:]] "getConstantI8"
32 ; CHECK-DAG: OpName %[[#GET_I16:]] "getConstantI16"
33 ; CHECK-DAG: OpName %[[#GET_I32:]] "getConstantI32"
34 ; CHECK-DAG: OpName %[[#GET_I64:]] "getConstantI64"
35 ; CHECK-DAG: OpName %[[#GET_LARGE_I64:]] "getLargeConstantI64"
37 ; CHECK-NOT: DAG-FENCE
39 ;; Types and Constants:
40 ; CHECK-DAG: %[[#I8:]] = OpTypeInt 8 0
41 ; CHECK-DAG: %[[#I16:]] = OpTypeInt 16 0
42 ; CHECK-DAG: %[[#I32:]] = OpTypeInt 32 0
43 ; CHECK-DAG: %[[#I64:]] = OpTypeInt 64 0
44 ; CHECK-DAG: %[[#CST_I8:]] = OpConstant %[[#I8]] 2
45 ; CHECK-DAG: %[[#CST_I16:]] = OpConstant %[[#I16]] 65478
46 ; CHECK-DAG: %[[#CST_I32:]] = OpConstant %[[#I32]] 42
47 ; CHECK-DAG: %[[#CST_I64:]] = OpConstant %[[#I64]] 123456789
48 ; CHECK-DAG: %[[#CST_LARGE_I64:]] = OpConstant %[[#I64]] 34359738368
50 ; CHECK: %[[#GET_I8]] = OpFunction %[[#I8]]
51 ; CHECK: OpReturnValue %[[#CST_I8]]
52 ; CHECK: OpFunctionEnd
54 ; CHECK: %[[#GET_I16]] = OpFunction %[[#I16]]
55 ; CHECK: OpReturnValue %[[#CST_I16]]
56 ; CHECK: OpFunctionEnd
58 ; CHECK: %[[#GET_I32]] = OpFunction %[[#I32]]
59 ; CHECK: OpReturnValue %[[#CST_I32]]
60 ; CHECK: OpFunctionEnd
62 ; CHECK: %[[#GET_I64]] = OpFunction %[[#I64]]
63 ; CHECK: OpReturnValue %[[#CST_I64]]
64 ; CHECK: OpFunctionEnd
66 ; CHECK: %[[#GET_LARGE_I64]] = OpFunction %[[#I64]]
67 ; CHECK: OpReturnValue %[[#CST_LARGE_I64]]
68 ; CHECK: OpFunctionEnd