Use the llvm-upgrade program to upgrade llvm assembly.
[oota-llvm.git] / test / Transforms / LoopSimplify / single-backedge.ll
1 ; The loop canonicalization pass should guarantee that there is one backedge 
2 ; for all loops.  This allows the -indvars pass to recognize the %IV 
3 ; induction variable in this testcase.
4
5 ; RUN: llvm-upgrade < %s | llvm-as | opt -indvars | llvm-dis | grep indvar
6
7 int %test(bool %C) {
8         br label %Loop
9 Loop:
10         %IV = phi uint [1, %0], [%IV2, %BE1], [%IV2, %BE2]
11         %IV2 = add uint %IV, 2
12         br bool %C, label %BE1, label %BE2
13 BE1:
14         br label %Loop
15 BE2:
16         br label %Loop
17 }