blob: dc7902db5233fe69928f9a72064ff287c73b72ab [file] [log] [blame]
; Test conditional branch where targets are the same.
; Tests issue: https://code.google.com/p/nativeclient/issues/detail?id=4212
; RUN: %p2i -i %s --insts | FileCheck %s
define void @f(i32 %foo, i32 %bar) {
entry:
%c = icmp ult i32 %foo, %bar
br i1 %c, label %block, label %block
block:
ret void
}
; Note that the branch is converted to an unconditional branch.
; CHECK: define void @f(i32 %foo, i32 %bar) {
; CHECK-NEXT: entry:
; CHECK-NEXT: %c = icmp ult i32 %foo, %bar
; CHECK-NEXT: br label %block
; CHECK-NEXT: block:
; CHECK-NEXT: ret void
; CHECK-NEXT: }