|
| 1 | +; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s |
| 2 | +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s |
| 3 | +; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s |
| 4 | + |
| 5 | +define void @main() { |
| 6 | +entry: |
| 7 | +; CHECK-DAG: %[[#short:]] = OpTypeInt 16 0 |
| 8 | +; CHECK-DAG: %[[#int:]] = OpTypeInt 32 0 |
| 9 | +; CHECK-DAG: %[[#long:]] = OpTypeInt 64 0 |
| 10 | + |
| 11 | +; CHECK-DAG: %[[#v2short:]] = OpTypeVector %[[#short]] 2 |
| 12 | +; CHECK-DAG: %[[#v3short:]] = OpTypeVector %[[#short]] 3 |
| 13 | +; CHECK-DAG: %[[#v4short:]] = OpTypeVector %[[#short]] 4 |
| 14 | + |
| 15 | +; CHECK-DAG: %[[#v2int:]] = OpTypeVector %[[#int]] 2 |
| 16 | +; CHECK-DAG: %[[#v3int:]] = OpTypeVector %[[#int]] 3 |
| 17 | +; CHECK-DAG: %[[#v4int:]] = OpTypeVector %[[#int]] 4 |
| 18 | + |
| 19 | +; CHECK-DAG: %[[#v2long:]] = OpTypeVector %[[#long]] 2 |
| 20 | +; CHECK-DAG: %[[#v3long:]] = OpTypeVector %[[#long]] 3 |
| 21 | +; CHECK-DAG: %[[#v4long:]] = OpTypeVector %[[#long]] 4 |
| 22 | + |
| 23 | +; CHECK-DAG: %[[#ptr_Function_short:]] = OpTypePointer Function %[[#short]] |
| 24 | +; CHECK-DAG: %[[#ptr_Function_int:]] = OpTypePointer Function %[[#int]] |
| 25 | +; CHECK-DAG: %[[#ptr_Function_long:]] = OpTypePointer Function %[[#long]] |
| 26 | +; CHECK-DAG: %[[#ptr_Function_v2short:]] = OpTypePointer Function %[[#v2short]] |
| 27 | +; CHECK-DAG: %[[#ptr_Function_v3short:]] = OpTypePointer Function %[[#v3short]] |
| 28 | +; CHECK-DAG: %[[#ptr_Function_v4short:]] = OpTypePointer Function %[[#v4short]] |
| 29 | +; CHECK-DAG: %[[#ptr_Function_v2int:]] = OpTypePointer Function %[[#v2int]] |
| 30 | +; CHECK-DAG: %[[#ptr_Function_v3int:]] = OpTypePointer Function %[[#v3int]] |
| 31 | +; CHECK-DAG: %[[#ptr_Function_v4int:]] = OpTypePointer Function %[[#v4int]] |
| 32 | +; CHECK-DAG: %[[#ptr_Function_v2long:]] = OpTypePointer Function %[[#v2long]] |
| 33 | +; CHECK-DAG: %[[#ptr_Function_v3long:]] = OpTypePointer Function %[[#v3long]] |
| 34 | +; CHECK-DAG: %[[#ptr_Function_v4long:]] = OpTypePointer Function %[[#v4long]] |
| 35 | + |
| 36 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_short]] Function |
| 37 | + %int16_t_Val = alloca i16, align 2 |
| 38 | + |
| 39 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_int]] Function |
| 40 | + %int_Val = alloca i32, align 4 |
| 41 | + |
| 42 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_long]] Function |
| 43 | + %int64_t_Val = alloca i64, align 8 |
| 44 | + |
| 45 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_v2short]] Function |
| 46 | + %int16_t2_Val = alloca <2 x i16>, align 4 |
| 47 | + |
| 48 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_v3short]] Function |
| 49 | + %int16_t3_Val = alloca <3 x i16>, align 8 |
| 50 | + |
| 51 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_v4short]] Function |
| 52 | + %int16_t4_Val = alloca <4 x i16>, align 8 |
| 53 | + |
| 54 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_v2int]] Function |
| 55 | + %int2_Val = alloca <2 x i32>, align 8 |
| 56 | + |
| 57 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_v3int]] Function |
| 58 | + %int3_Val = alloca <3 x i32>, align 16 |
| 59 | + |
| 60 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_v4int]] Function |
| 61 | + %int4_Val = alloca <4 x i32>, align 16 |
| 62 | + |
| 63 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_v2long]] Function |
| 64 | + %int64_t2_Val = alloca <2 x i64>, align 16 |
| 65 | + |
| 66 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_v3long]] Function |
| 67 | + %int64_t3_Val = alloca <3 x i64>, align 32 |
| 68 | + |
| 69 | +; CHECK: %[[#]] = OpVariable %[[#ptr_Function_v4long]] Function |
| 70 | + %int64_t4_Val = alloca <4 x i64>, align 32 |
| 71 | + |
| 72 | + ret void |
| 73 | +} |
0 commit comments