[X86] Update test/CodeGen/X86/avg.ll with the help of update_llc_test_checks.py....
[oota-llvm.git] / test / CodeGen / CPP / 2009-05-04-CondBr.ll
1 ; RUN: llc < %s -march=cpp -cppgen=program -o %t
2 ; RUN: grep "BranchInst::Create(label_if_then, label_if_end, int1_cmp, label_entry);" %t
3
4 define i32 @some_func(i32 %a) nounwind {
5 entry:
6         %retval = alloca i32            ; <i32*> [#uses=2]
7         %a.addr = alloca i32            ; <i32*> [#uses=8]
8         store i32 %a, i32* %a.addr
9         %tmp = load i32, i32* %a.addr           ; <i32> [#uses=1]
10         %inc = add i32 %tmp, 1          ; <i32> [#uses=1]
11         store i32 %inc, i32* %a.addr
12         %tmp1 = load i32, i32* %a.addr          ; <i32> [#uses=1]
13         %cmp = icmp slt i32 %tmp1, 3            ; <i1> [#uses=1]
14         br i1 %cmp, label %if.then, label %if.end
15
16 if.then:                ; preds = %entry
17         store i32 7, i32* %a.addr
18         br label %if.end
19
20 if.end:         ; preds = %if.then, %entry
21         %tmp2 = load i32, i32* %a.addr          ; <i32> [#uses=1]
22         %inc3 = add i32 %tmp2, 1                ; <i32> [#uses=1]
23         store i32 %inc3, i32* %a.addr
24         %tmp4 = load i32, i32* %a.addr          ; <i32> [#uses=1]
25         store i32 %tmp4, i32* %retval
26         %0 = load i32, i32* %retval             ; <i32> [#uses=1]
27         ret i32 %0
28 }