Change these tests to feed the assembly files to opt directly, instead
[oota-llvm.git] / test / Transforms / SimplifyCFG / 2003-08-17-BranchFold.ll
1 ; This test checks to make sure that 'br X, Dest, Dest' is folded into 
2 ; 'br Dest'
3
4 ; RUN: opt %s -simplifycfg | llvm-dis | \
5 ; RUN:   not grep {br i1 %c2}
6
7 declare void @noop()
8
9 define i32 @test(i1 %c1, i1 %c2) {
10         call void @noop( )
11         br i1 %c1, label %A, label %Y
12 A:              ; preds = %0
13         call void @noop( )
14         br i1 %c2, label %X, label %X
15 X:              ; preds = %Y, %A, %A
16         call void @noop( )
17         ret i32 0
18 Y:              ; preds = %0
19         call void @noop( )
20         br label %X
21 }
22