| ; Tests if we handle a branch instructions. |
| ; RUN: %p2i -i %s --insts | FileCheck %s |
| ; RUN: %if --need=allow_disable_ir_gen --command \ |
| ; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \ |
| ; RUN: | %if --need=allow_disable_ir_gen --command \ |
| ; RUN: FileCheck --check-prefix=NOIR %s |
| define void @SimpleBranch() { |
| ; CHECK: define void @SimpleBranch() { |
| ; CHECK-NEXT: br label %b3 |
| ; CHECK-NEXT: br label %b2 |
| ; CHECK-NEXT: br label %b1 |
| define void @CondBranch(i32 %p) { |
| %test = trunc i32 %p to i1 |
| br i1 %test, label %b1, label %b2 |
| br i1 %test, label %b2, label %b1 |
| ; CHECK-NEXT: define void @CondBranch(i32 %p) { |
| ; CHECK-NEXT: %test = trunc i32 %p to i1 |
| ; CHECK-NEXT: br i1 %test, label %b1, label %b2 |
| ; CHECK-NEXT: br i1 %test, label %b2, label %b1 |
| ; NOIR: Total across all functions |