Ignore stderr for some more tests that expect warnings there.
[oota-llvm.git] / test / Transforms / InstCombine / 2008-06-08-ICmpPHI.ll
1 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {phi i32} | count 2
2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
3 target triple = "i386-apple-darwin8"
4
5 define void @test() nounwind  {
6 entry:
7         br label %bb
8
9 bb:             ; preds = %bb16, %entry
10         %i.0 = phi i32 [ 0, %entry ], [ %indvar.next, %somebb ]         ; <i32> [#uses=1]
11         %x.0 = phi i32 [ 37, %entry ], [ %tmp17, %somebb ]              ; <i32> [#uses=1]
12         %tmp = tail call i32 (...)* @bork( ) nounwind           ; <i32> [#uses=0]
13         %tmp1 = tail call i32 (...)* @bork( ) nounwind          ; <i32> [#uses=0]
14         %tmp2 = tail call i32 (...)* @bork( ) nounwind          ; <i32> [#uses=1]
15         %tmp3 = icmp eq i32 %tmp2, 0            ; <i1> [#uses=1]
16         br i1 %tmp3, label %bb7, label %bb5
17
18 bb5:            ; preds = %bb
19         %tmp6 = tail call i32 (...)* @bork( ) nounwind          ; <i32> [#uses=0]
20         br label %bb7
21
22 bb7:            ; preds = %bb5, %bb
23         %tmp8 = tail call i32 (...)* @bork( ) nounwind          ; <i32> [#uses=0]
24         %tmp9 = tail call i32 (...)* @bork( ) nounwind          ; <i32> [#uses=0]
25         %tmp11 = icmp eq i32 %x.0, 37           ; <i1> [#uses=1]
26         br i1 %tmp11, label %bb14, label %bb16
27
28 bb14:           ; preds = %bb7
29         %tmp15 = tail call i32 (...)* @bar( ) nounwind          ; <i32> [#uses=0]
30         br label %bb16
31
32 bb16:           ; preds = %bb14, %bb7
33         %tmp17 = tail call i32 (...)* @zap( ) nounwind          ; <i32> [#uses=1]
34         %indvar.next = add i32 %i.0, 1          ; <i32> [#uses=2]
35         %exitcond = icmp eq i32 %indvar.next, 42                ; <i1> [#uses=1]
36         br i1 %exitcond, label %return, label %somebb
37
38 somebb:
39         br label %bb
40
41 return:         ; preds = %bb16
42         ret void
43 }
44
45 declare i32 @bork(...)
46
47 declare i32 @bar(...)
48
49 declare i32 @zap(...)