1 ; RUN: opt < %s -S -passes="default<O1>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
2 ; RUN: opt < %s -S -passes="default<O2>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
3 ; RUN: opt < %s -S -passes="default<O3>" | FileCheck %s -check-prefixes=NONTRIVIAL,CHECK
4 ; RUN: opt < %s -S -passes="default<O3>" -enable-npm-O3-nontrivial-unswitch=0 | FileCheck %s -check-prefixes=TRIVIAL,CHECK
5 ; RUN: opt < %s -S -passes="default<Os>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
6 ; RUN: opt < %s -S -passes="default<Oz>" | FileCheck %s -check-prefixes=TRIVIAL,CHECK
12 ; TRIVIAL-NOT: loop_begin.us:
13 ; NONTRIVIAL: loop_begin.us:
15 define i32 @test1(i1* %ptr, i1 %cond1, i1 %cond2) {
20 br i1 %cond1, label %loop_a, label %loop_b
27 br i1 %cond2, label %loop_b_a, label %loop_b_b
38 %v = load i1, i1* %ptr
39 br i1 %v, label %loop_begin, label %loop_exit
45 ; CHECK-NOT: loop2_begin.us:
46 define i32 @test2(i1* %ptr, i1 %cond1, i1 %cond2) optsize {
51 br i1 %cond1, label %loop2_a, label %loop2_b
58 br i1 %cond2, label %loop2_b_a, label %loop2_b_b
69 %v = load i1, i1* %ptr
70 br i1 %v, label %loop2_begin, label %loop2_exit