OLD | NEW |
1 ; RUIN: %llvm2ice -verbose inst %s | FileCheck %s | 1 ; This test is lowered from C code that does some simple aritmetic |
2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 2 ; with struct members. |
| 3 |
| 4 ; RUN: %llvm2ice --verbose inst %s | FileCheck %s |
| 5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
3 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s | 6 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s |
4 | 7 |
5 ; This file is lowered from C code that does some simple aritmetic with | |
6 ; struct members. It's also built with the PNaCl toolchain so this is the | |
7 ; stable ABI subset of LLVM IR (structs are gone, pointers turned into i32, | |
8 ; geps gone, etc.) | |
9 | |
10 define internal i32 @compute_important_function(i32 %v1, i32 %v2) { | 8 define internal i32 @compute_important_function(i32 %v1, i32 %v2) { |
11 entry: | 9 entry: |
12 %v1.asptr = inttoptr i32 %v1 to i32* | 10 %v1.asptr = inttoptr i32 %v1 to i32* |
13 %_v0 = load i32* %v1.asptr, align 1 | 11 %_v0 = load i32* %v1.asptr, align 1 |
14 | 12 |
15 ; CHECK: entry: | 13 ; CHECK: entry: |
16 ; CHECK-NEXT: %v1.asptr = i32 %v1 | 14 ; CHECK-NEXT: %v1.asptr = i32 %v1 |
17 ; CHECK-NEXT: %_v0 = load i32* {{.*}}, align 1 | 15 ; CHECK-NEXT: %_v0 = load i32* {{.*}}, align 1 |
18 | 16 |
19 %v2.asptr = inttoptr i32 %v2 to i32* | 17 %v2.asptr = inttoptr i32 %v2 to i32* |
(...skipping 26 matching lines...) Expand all Loading... |
46 %sub = sub i32 %add, %mul3 | 44 %sub = sub i32 %add, %mul3 |
47 %sub12 = sub i32 %sub, %mul11 | 45 %sub12 = sub i32 %sub, %mul11 |
48 ret i32 %sub12 | 46 ret i32 %sub12 |
49 | 47 |
50 ; CHECK: %sub12 = sub i32 %sub, %mul11 | 48 ; CHECK: %sub12 = sub i32 %sub, %mul11 |
51 ; CHECK-NEXT: ret i32 %sub12 | 49 ; CHECK-NEXT: ret i32 %sub12 |
52 } | 50 } |
53 | 51 |
54 ; ERRORS-NOT: ICE translation error | 52 ; ERRORS-NOT: ICE translation error |
55 ; DUMP-NOT: SZ | 53 ; DUMP-NOT: SZ |
OLD | NEW |