|
1 |
| -; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV |
2 |
| -; |
3 |
| -; CHECK-SPIRV-DAG: %[[#i32:]] = OpTypeInt 32 0 |
4 |
| -; CHECK-SPIRV-DAG: %[[#one:]] = OpConstant %[[#i32]] 1 |
5 |
| -; CHECK-SPIRV-DAG: %[[#two:]] = OpConstant %[[#i32]] 2 |
6 |
| -; CHECK-SPIRV-DAG: %[[#three:]] = OpConstant %[[#i32]] 3 |
7 |
| -; CHECK-SPIRV-DAG: %[[#i32x3:]] = OpTypeArray %[[#i32]] %[[#three]] |
8 |
| -; CHECK-SPIRV-DAG: %[[#test_arr_init:]] = OpConstantComposite %[[#i32x3]] %[[#one]] %[[#two]] %[[#three]] |
9 |
| -; CHECK-SPIRV-DAG: %[[#twelve:]] = OpConstant %[[#i32]] 12 |
10 |
| -; CHECK-SPIRV-DAG: %[[#const_i32x3_ptr:]] = OpTypePointer UniformConstant %[[#i32x3]] |
11 |
| - |
12 |
| -; CHECK-SPIRV: %[[#test_arr2:]] = OpVariable %[[#const_i32x3_ptr]] UniformConstant %[[#test_arr_init]] |
13 |
| -; CHECK-SPIRV: %[[#test_arr:]] = OpVariable %[[#const_i32x3_ptr]] UniformConstant %[[#test_arr_init]] |
14 |
| - |
15 |
| -; CHECK-SPIRV-DAG: %[[#i32x3_ptr:]] = OpTypePointer Function %[[#i32x3]] |
16 |
| - |
17 |
| -; CHECK-SPIRV: %[[#arr:]] = OpVariable %[[#i32x3_ptr]] Function |
18 |
| -; CHECK-SPIRV: %[[#arr2:]] = OpVariable %[[#i32x3_ptr]] Function |
19 |
| -; CHECK-SPIRV: OpCopyMemorySized %[[#arr]] %[[#test_arr]] %[[#twelve]] Aligned 4 |
20 |
| -; CHECK-SPIRV: OpCopyMemorySized %[[#arr2]] %[[#test_arr2]] %[[#twelve]] Aligned 4 |
| 1 | +; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefixes=CHECK-SPIRV,CHECK-SPIRV-32 |
| 2 | +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %} |
| 3 | +; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefixes=CHECK-SPIRV,CHECK-SPIRV-64 |
| 4 | +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %} |
| 5 | + |
| 6 | +; CHECK-SPIRV-64-DAG: %[[#i64:]] = OpTypeInt 64 0 |
| 7 | + |
| 8 | +; CHECK-SPIRV-DAG: %[[#i32:]] = OpTypeInt 32 0 |
| 9 | +; CHECK-SPIRV-DAG: %[[#one:]] = OpConstant %[[#i32]] 1 |
| 10 | +; CHECK-SPIRV-DAG: %[[#two:]] = OpConstant %[[#i32]] 2 |
| 11 | +; CHECK-SPIRV-DAG: %[[#three:]] = OpConstant %[[#i32]] 3 |
| 12 | +; CHECK-SPIRV-DAG: %[[#i32x3:]] = OpTypeArray %[[#i32]] %[[#three]] |
| 13 | +; CHECK-SPIRV-DAG: %[[#test_arr_init:]] = OpConstantComposite %[[#i32x3]] %[[#one]] %[[#two]] %[[#three]] |
| 14 | +; CHECK-SPIRV-DAG: %[[#twelve:]] = OpConstant %[[#i32]] 12 |
| 15 | +; CHECK-SPIRV-DAG: %[[#const_i32x3_ptr:]] = OpTypePointer UniformConstant %[[#i32x3]] |
| 16 | + |
| 17 | +; CHECK-SPIRV: %[[#test_arr2:]] = OpVariable %[[#const_i32x3_ptr]] UniformConstant %[[#test_arr_init]] |
| 18 | +; CHECK-SPIRV: %[[#test_arr:]] = OpVariable %[[#const_i32x3_ptr]] UniformConstant %[[#test_arr_init]] |
| 19 | + |
| 20 | +; CHECK-SPIRV-DAG: %[[#i32x3_ptr:]] = OpTypePointer Function %[[#i32x3]] |
| 21 | + |
| 22 | +; CHECK-SPIRV: %[[#arr:]] = OpVariable %[[#i32x3_ptr]] Function |
| 23 | +; CHECK-SPIRV: %[[#arr2:]] = OpVariable %[[#i32x3_ptr]] Function |
| 24 | + |
| 25 | +; CHECK-SPIRV-32: OpCopyMemorySized %[[#arr]] %[[#test_arr]] %[[#twelve]] Aligned 4 |
| 26 | +; CHECK-SPIRV-32: OpCopyMemorySized %[[#arr2]] %[[#test_arr2]] %[[#twelve]] Aligned 4 |
| 27 | + |
| 28 | +; CHECK-SPIRV-64: %[[#twelvezext1:]] = OpUConvert %[[#i64:]] %[[#twelve:]] |
| 29 | +; CHECK-SPIRV-64: OpCopyMemorySized %[[#arr]] %[[#test_arr]] %[[#twelvezext1]] Aligned 4 |
| 30 | +; CHECK-SPIRV-64: %[[#twelvezext2:]] = OpUConvert %[[#i64:]] %[[#twelve:]] |
| 31 | +; CHECK-SPIRV-64: OpCopyMemorySized %[[#arr2]] %[[#test_arr2]] %[[#twelvezext2]] Aligned 4 |
21 | 32 |
|
22 | 33 |
|
23 | 34 | @__const.test.arr = private unnamed_addr addrspace(2) constant [3 x i32] [i32 1, i32 2, i32 3], align 4
|
|
0 commit comments