| OLD | NEW |
| 1 ; This is distilled from a real function that led to a bug in the | 1 ; This is distilled from a real function that led to a bug in the |
| 2 ; address mode optimization code. It followed assignment chains | 2 ; address mode optimization code. It followed assignment chains |
| 3 ; through non-SSA temporaries created from Phi instruction lowering. | 3 ; through non-SSA temporaries created from Phi instruction lowering. |
| 4 ; | 4 ; |
| 5 ; This test depends to some degree on the stability of "--verbose | 5 ; This test depends to some degree on the stability of "--verbose |
| 6 ; addropt" output format. | 6 ; addropt" output format. |
| 7 | 7 |
| 8 ; REQUIRES: x86-32 | 8 ; REQUIRES: target_X8632 |
| 9 ; REQUIRES: allow_dump | 9 ; REQUIRES: allow_dump |
| 10 ; RUN: %p2i -i %s --args -O2 --verbose addropt | FileCheck %s | 10 ; RUN: %p2i -i %s --args -O2 --verbose addropt | FileCheck %s |
| 11 | 11 |
| 12 declare i32 @_calloc_r(i32, i32, i32) | 12 declare i32 @_calloc_r(i32, i32, i32) |
| 13 | 13 |
| 14 define internal i32 @_Balloc(i32 %ptr, i32 %k) { | 14 define internal i32 @_Balloc(i32 %ptr, i32 %k) { |
| 15 entry: | 15 entry: |
| 16 %gep = add i32 %ptr, 76 | 16 %gep = add i32 %ptr, 76 |
| 17 %gep.asptr = inttoptr i32 %gep to i32* | 17 %gep.asptr = inttoptr i32 %gep to i32* |
| 18 %0 = load i32* %gep.asptr, align 1 | 18 %0 = load i32* %gep.asptr, align 1 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 ; Instruction: [ 12] %gep_array = mul i32 %k, 4 | 59 ; Instruction: [ 12] %gep_array = mul i32 %k, 4 |
| 60 ; results in Base=%__4, Index=%k, Shift=2, Offset=0 | 60 ; results in Base=%__4, Index=%k, Shift=2, Offset=0 |
| 61 ; | 61 ; |
| 62 ; CHECK-NOT: results in Base=%__4, | 62 ; CHECK-NOT: results in Base=%__4, |
| 63 ; | 63 ; |
| 64 ret i32 %2 | 64 ret i32 %2 |
| 65 | 65 |
| 66 return: ; preds = %if.then | 66 return: ; preds = %if.then |
| 67 ret i32 0 | 67 ret i32 0 |
| 68 } | 68 } |
| OLD | NEW |