Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S | grep "ret i32 %A"
      2 ; RUN: opt < %s -die -S | not grep call.*llvm
      3 
      4 define i32 @test(i32 %A) {
      5 	%X = or i1 false, false		
      6 	br i1 %X, label %T, label %C
      7 
      8 T:		; preds = %0
      9 	%B = add i32 %A, 1	
     10 	br label %C
     11 
     12 C:		; preds = %T, %0
     13 	%C.upgrd.1 = phi i32 [ %B, %T ], [ %A, %0 ]
     14 	ret i32 %C.upgrd.1
     15 }
     16 
     17 define i32* @test2(i32 %width) {
     18 	%tmp = call i8* @llvm.stacksave( )
     19         %tmp14 = alloca i32, i32 %width
     20 	ret i32* %tmp14
     21 } 
     22 
     23 declare i8* @llvm.stacksave()
     24 
     25 declare void @llvm.lifetime.start(i64, i8*)
     26 declare void @llvm.lifetime.end(i64, i8*)
     27 
     28 define void @test3() {
     29   call void @llvm.lifetime.start(i64 -1, i8* undef)
     30   call void @llvm.lifetime.end(i64 -1, i8* undef)
     31   ret void
     32 }
     33 
     34