Debian Codegraph @

llvm/test/CodeGen/SPIRV/constant/local-arbitrary-width-integers-constants-type-promotion.ll

raw
1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
2
3 define i4 @getConstantI4() {
4 ret i4 2 ; i4 => OpTypeInt 8
5 }
6
7 define i11 @getConstantI11() {
8 ret i11 7 ; i11 => OpTypeInt 16
9 }
10
11 define i24 @getConstantI24() {
12 ret i24 42 ; i24 => OpTypeInt 32
13 }
14
15 define i63 @getConstantI63() {
16 ret i63 5705 ; i63 => OpTypeInt 64
17 }
18
19 ;; Capabilities:
20 ; CHECK-DAG: OpCapability Int8
21 ; CHECK-DAG: OpCapability Int16
22 ; CHECK-DAG: OpCapability Int64
23
24 ; CHECK-NOT: DAG-FENCE
25
26 ;; Names:
27 ; CHECK-DAG: OpName %[[#GET_I4:]] "getConstantI4"
28 ; CHECK-DAG: OpName %[[#GET_I11:]] "getConstantI11"
29 ; CHECK-DAG: OpName %[[#GET_I24:]] "getConstantI24"
30 ; CHECK-DAG: OpName %[[#GET_I63:]] "getConstantI63"
31
32 ; CHECK-NOT: DAG-FENCE
33
34 ;; Types and Constants:
35 ; CHECK-DAG: %[[#I8:]] = OpTypeInt 8 0
36 ; CHECK-DAG: %[[#I16:]] = OpTypeInt 16 0
37 ; CHECK-DAG: %[[#I32:]] = OpTypeInt 32 0
38 ; CHECK-DAG: %[[#I64:]] = OpTypeInt 64 0
39 ; CHECK-DAG: %[[#CST_I8:]] = OpConstant %[[#I8]] 2
40 ; CHECK-DAG: %[[#CST_I16:]] = OpConstant %[[#I16]] 7
41 ; CHECK-DAG: %[[#CST_I32:]] = OpConstant %[[#I32]] 42
42 ; CHECK-DAG: %[[#CST_I64:]] = OpConstant %[[#I64]] 5705
43
44 ; CHECK: %[[#GET_I4]] = OpFunction %[[#I8]]
45 ; CHECK: OpReturnValue %[[#CST_I8]]
46 ; CHECK: OpFunctionEnd
47
48 ; CHECK: %[[#GET_I11]] = OpFunction %[[#I16]]
49 ; CHECK: OpReturnValue %[[#CST_I16]]
50 ; CHECK: OpFunctionEnd
51
52 ; CHECK: %[[#GET_I24]] = OpFunction %[[#I32]]
53 ; CHECK: OpReturnValue %[[#CST_I32]]
54 ; CHECK: OpFunctionEnd
55
56 ; CHECK: %[[#GET_I63]] = OpFunction %[[#I64]]
57 ; CHECK: OpReturnValue %[[#CST_I64]]
58 ; CHECK: OpFunctionEnd