Teach masked value is zero about add and sub, and use MVIZ to
[oota-llvm.git] / test / Transforms / ADCE / 2003-12-19-MergeReturn.llx
1 ; This testcase was failing because without merging the return blocks, ADCE
2 ; didn't know that it could get rid of the then.0 block.
3
4 ; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep load
5
6
7 define void @main(i32 %argc, i8** %argv) {
8 entry:
9         call void @__main( )
10         %tmp.1 = icmp ule i32 %argc, 5          ; <i1> [#uses=1]
11         br i1 %tmp.1, label %then.0, label %return
12
13 then.0:         ; preds = %entry
14         %tmp.8 = load i8** %argv                ; <i8*> [#uses=1]
15         %tmp.10 = load i8* %tmp.8               ; <i8> [#uses=1]
16         %tmp.11 = icmp eq i8 %tmp.10, 98                ; <i1> [#uses=1]
17         br i1 %tmp.11, label %then.1, label %return
18
19 then.1:         ; preds = %then.0
20         ret void
21
22 return:         ; preds = %then.0, %entry
23         ret void
24 }
25
26 declare void @__main()
27