|
1 | 1 | ; This test shows how value attributes are being passed during different translation steps. |
2 | 2 | ; See also test/CodeGen/SPIRV/optimizations/add-check-overflow.ll. |
3 | 3 |
|
4 | | -; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -print-after=prepare-functions 2>&1 | FileCheck %s --check-prefix=CHECK-PREPARE |
| 4 | +; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -print-after=prepare-functions 2>&1 -verify-machineinstrs | FileCheck %s --check-prefix=CHECK-PREPARE |
5 | 5 | ; Intrinsics with aggregate return type are not substituted/removed. |
6 | 6 | ; CHECK-PREPARE: @llvm.uadd.with.overflow.i32 |
7 | 7 |
|
8 | | -; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -print-after=emit-intrinsics 2>&1 | FileCheck %s --check-prefix=CHECK-IR |
| 8 | +; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -print-after=emit-intrinsics 2>&1 -verify-machineinstrs | FileCheck %s --check-prefix=CHECK-IR |
9 | 9 | ; Aggregate data are wrapped into @llvm.fake.use(), |
10 | 10 | ; and their attributes are packed into a metadata for @llvm.spv.value.md(). |
11 | 11 | ; CHECK-IR: %[[R1:.*]] = call { i32, i1 } @llvm.uadd.with.overflow.i32 |
|
18 | 18 | ; Origin data type of the value. |
19 | 19 | ; CHECK-IR: !1 = !{{[{]}}{{[{]}} i32, i1 {{[}]}} poison{{[}]}} |
20 | 20 |
|
21 | | -; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -print-after=irtranslator 2>&1 | FileCheck %s --check-prefix=CHECK-GMIR |
| 21 | +; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -print-after=irtranslator 2>&1 -verify-machineinstrs | FileCheck %s --check-prefix=CHECK-GMIR |
22 | 22 | ; Required info succeeded to get through IRTranslator. |
23 | 23 | ; CHECK-GMIR: %[[phires:.*]]:_(s32) = G_PHI |
24 | 24 | ; CHECK-GMIR: %[[math:.*]]:id(s32), %[[ov:.*]]:_(s1) = G_UADDO %[[phires]]:_, %[[#]]:_ |
25 | 25 | ; CHECK-GMIR: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.spv.value.md), !0 |
26 | 26 | ; CHECK-GMIR: FAKE_USE %[[math]]:id(s32), %[[ov]]:_(s1) |
27 | 27 |
|
28 | | -; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -print-after=spirv-prelegalizer 2>&1 | FileCheck %s --check-prefix=CHECK-PRE |
| 28 | +; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -print-after=spirv-prelegalizer 2>&1 -verify-machineinstrs | FileCheck %s --check-prefix=CHECK-PRE |
29 | 29 | ; Internal service instructions are consumed. |
30 | 30 | ; CHECK-PRE: G_UADDO |
31 | 31 | ; CHECK-PRE-NO: llvm.spv.value.md |
32 | 32 | ; CHECK-PRE-NO: FAKE_USE |
33 | 33 |
|
34 | | -; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -print-after=instruction-select 2>&1 | FileCheck %s --check-prefix=CHECK-ISEL |
| 34 | +; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -print-after=instruction-select 2>&1 -verify-machineinstrs | FileCheck %s --check-prefix=CHECK-ISEL |
35 | 35 | ; Names and types are restored and correctly encoded. Correct instruction selection is completed. |
36 | 36 | ; CHECK-ISEL-DAG: %[[int32:.*]]:type = OpTypeInt 32, 0 |
37 | 37 | ; CHECK-ISEL-DAG: %[[struct:.*]]:type = OpTypeStruct %[[int32]]:type, %[[int32]]:type |
|
0 commit comments