|
7 | 7 | ; CHECK: [[image_t:%[0-9]+]] = OpTypeImage %3 2D 2 0 0 1 Unknown |
8 | 8 | %type_2d_image = type target("spirv.Image", float, 1, 2, 0, 0, 1, 0) |
9 | 9 |
|
10 | | -%literal_false = type target("spirv.Literal", 0) |
11 | | -%literal_8 = type target("spirv.Literal", 8) |
| 10 | +%literal_true = type target("spirv.Literal", 1) |
| 11 | +%literal_32 = type target("spirv.Literal", 32) |
12 | 12 |
|
13 | 13 | ; CHECK: [[uint32_4:%[0-9]+]] = OpConstant [[uint32_t]] 4 |
14 | 14 | %integral_constant_4 = type target("spirv.IntegralConstant", i32, 4) |
|
18 | 18 |
|
19 | 19 | ; CHECK: [[getTexArray_t:%[0-9]+]] = OpTypeFunction [[array_t]] |
20 | 20 |
|
| 21 | +; CHECK: !0x40015 [[int_t:%[0-9]+]] 32 1 |
| 22 | +%int_t = type target("spirv.Type", %literal_32, %literal_true, 21, 0, 0) |
| 23 | + |
| 24 | +; CHECK: [[getInt_t:%[0-9]+]] = OpTypeFunction [[int_t]] |
| 25 | + |
21 | 26 | ; CHECK: [[getTexArray:%[0-9]+]] = OpFunction [[array_t]] None [[getTexArray_t]] |
22 | 27 | declare %ArrayTex2D @getTexArray() |
23 | 28 |
|
| 29 | +; CHECK: [[getInt:%[0-9]+]] = OpFunction [[int_t]] None [[getInt_t]] |
| 30 | +declare %int_t @getInt() |
| 31 | + |
24 | 32 | define void @main() #1 { |
25 | 33 | entry: |
26 | 34 | %images = alloca %ArrayTex2D |
27 | 35 |
|
28 | 36 | ; CHECK: {{%[0-9]+}} = OpFunctionCall [[array_t]] [[getTexArray]] |
29 | 37 | %retTex = call %ArrayTex2D @getTexArray() |
30 | 38 |
|
| 39 | +; CHECK: {{%[0-9]+}} = OpFunctionCall [[int_t]] [[getInt]] |
| 40 | + %i = call %int_t @getInt() |
| 41 | + |
31 | 42 | ret void |
32 | 43 | } |
0 commit comments