Refactor: Simplify boolean conditional return statements in llvm/lib/Support
[oota-llvm.git] / test / CodeGen / Hexagon / early-if-phi-i1.ll
1 ; RUN: llc < %s
2 ; REQUIRES: asserts
3 ; Check that the early if-conversion does not predicate block1 (where the
4 ; join block has a phi node of type i1).
5
6 define i1 @foo(i32 %x, i32* %p) {
7 entry:
8   %c = icmp sgt i32 %x, 0
9   %c1 = icmp sgt i32 %x, 10
10   br i1 %c, label %block2, label %block1
11 block1:
12   store i32 1, i32* %p, align 4
13   br label %block2
14 block2:
15   %b = phi i1 [ 0, %entry ], [ %c1, %block1 ]
16   ret i1 %b
17 }