Add a test for the 'init' option property.
[oota-llvm.git] / test / Transforms / ConstProp / basictest.ll
1 ; RUN: opt < %s -constprop -die -S | FileCheck %s
2
3 ; This is a basic sanity check for constant propogation.  The add instruction 
4 ; should be eliminated.
5 define i32 @test1(i1 %B) {
6         br i1 %B, label %BB1, label %BB2
7
8 BB1:      
9         %Val = add i32 0, 0
10         br label %BB3
11
12 BB2:      
13         br label %BB3
14
15 BB3:     
16 ; CHECK: @test1
17 ; CHECK: %Ret = phi i32 [ 0, %BB1 ], [ 1, %BB2 ]
18         %Ret = phi i32 [ %Val, %BB1 ], [ 1, %BB2 ] 
19         ret i32 %Ret
20 }
21