OLD | NEW |
1 ; This test is lowered from C code that does some simple aritmetic | 1 ; This test is lowered from C code that does some simple aritmetic |
2 ; with struct members. | 2 ; with struct members. |
3 | 3 |
4 ; TODO(kschimpf) Find out why lc2i is needed. | 4 ; TODO(kschimpf) Find out why lc2i is needed. |
5 ; RUN: %lc2i -i %s --args --verbose inst | FileCheck %s | 5 ; RUN: %lc2i -i %s --args --verbose inst | FileCheck %s |
6 ; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s | 6 ; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s |
7 ; RUN: %lc2i -i %s --insts | %szdiff %s | FileCheck --check-prefix=DUMP %s | |
8 | 7 |
9 define internal i32 @compute_important_function(i32 %v1, i32 %v2) { | 8 define internal i32 @compute_important_function(i32 %v1, i32 %v2) { |
10 entry: | 9 entry: |
11 %__2 = inttoptr i32 %v1 to i32* | 10 %__2 = inttoptr i32 %v1 to i32* |
12 %_v0 = load i32* %__2, align 1 | 11 %_v0 = load i32* %__2, align 1 |
13 | 12 |
14 ; CHECK: entry: | 13 ; CHECK: entry: |
15 ; CHECK-NEXT: %__2 = i32 %v1 | 14 ; CHECK-NEXT: %__2 = i32 %v1 |
16 ; CHECK-NEXT: %_v0 = load i32* {{.*}}, align 1 | 15 ; CHECK-NEXT: %_v0 = load i32* {{.*}}, align 1 |
17 | 16 |
(...skipping 26 matching lines...) Expand all Loading... |
44 %add = sub i32 %add4.neg, %_v3 | 43 %add = sub i32 %add4.neg, %_v3 |
45 %sub = sub i32 %add, %mul3 | 44 %sub = sub i32 %add, %mul3 |
46 %sub12 = sub i32 %sub, %mul11 | 45 %sub12 = sub i32 %sub, %mul11 |
47 ret i32 %sub12 | 46 ret i32 %sub12 |
48 | 47 |
49 ; CHECK: %sub12 = sub i32 %sub, %mul11 | 48 ; CHECK: %sub12 = sub i32 %sub, %mul11 |
50 ; CHECK-NEXT: ret i32 %sub12 | 49 ; CHECK-NEXT: ret i32 %sub12 |
51 } | 50 } |
52 | 51 |
53 ; ERRORS-NOT: ICE translation error | 52 ; ERRORS-NOT: ICE translation error |
54 ; DUMP-NOT: SZ | |
OLD | NEW |