| OLD | NEW |
| 1 ; Test conditional branch where targets are the same. | 1 ; Test conditional branch where targets are the same. |
| 2 ; Tests issue: https://code.google.com/p/nativeclient/issues/detail?id=4212 | 2 ; Tests issue: https://code.google.com/p/nativeclient/issues/detail?id=4212 |
| 3 ; REQUIRES: allow_dump | 3 ; REQUIRES: allow_dump |
| 4 | 4 |
| 5 ; RUN: %p2i -i %s --insts | FileCheck %s | 5 ; RUN: %p2i -i %s --insts | FileCheck %s |
| 6 | 6 |
| 7 define void @f(i32 %foo, i32 %bar) { | 7 define internal void @f(i32 %foo, i32 %bar) { |
| 8 entry: | 8 entry: |
| 9 %c = icmp ult i32 %foo, %bar | 9 %c = icmp ult i32 %foo, %bar |
| 10 br i1 %c, label %block, label %block | 10 br i1 %c, label %block, label %block |
| 11 block: | 11 block: |
| 12 ret void | 12 ret void |
| 13 } | 13 } |
| 14 | 14 |
| 15 ; Note that the branch is converted to an unconditional branch. | 15 ; Note that the branch is converted to an unconditional branch. |
| 16 | 16 |
| 17 ; CHECK: define void @f(i32 %foo, i32 %bar) { | 17 ; CHECK: define internal void @f(i32 %foo, i32 %bar) { |
| 18 ; CHECK-NEXT: entry: | 18 ; CHECK-NEXT: entry: |
| 19 ; CHECK-NEXT: %c = icmp ult i32 %foo, %bar | 19 ; CHECK-NEXT: %c = icmp ult i32 %foo, %bar |
| 20 ; CHECK-NEXT: br label %block | 20 ; CHECK-NEXT: br label %block |
| 21 ; CHECK-NEXT: block: | 21 ; CHECK-NEXT: block: |
| 22 ; CHECK-NEXT: ret void | 22 ; CHECK-NEXT: ret void |
| 23 ; CHECK-NEXT: } | 23 ; CHECK-NEXT: } |
| OLD | NEW |