• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
6define i1 @foo(i32 %x, i32* %p) {
7entry:
8  %c = icmp sgt i32 %x, 0
9  %c1 = icmp sgt i32 %x, 10
10  br i1 %c, label %block2, label %block1
11block1:
12  store i32 1, i32* %p, align 4
13  br label %block2
14block2:
15  %b = phi i1 [ 0, %entry ], [ %c1, %block1 ]
16  ret i1 %b
17}
18