New files, testing for a crash in ADCE compiling QT and a missed optimization.
[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 implementation   ; Functions:
8
9 void %main(uint %argc, sbyte** %argv) {
10 entry:
11         call void %__main( )
12         %tmp.1 = setle uint %argc, 5            ; <bool> [#uses=1]
13         br bool %tmp.1, label %then.0, label %return
14
15 then.0:         ; preds = %entry
16         %tmp.8 = load sbyte** %argv             ; <sbyte*> [#uses=1]
17         %tmp.10 = load sbyte* %tmp.8            ; <sbyte> [#uses=1]
18         %tmp.11 = seteq sbyte %tmp.10, 98               ; <bool> [#uses=1]
19         br bool %tmp.11, label %then.1, label %return
20
21 then.1:         ; preds = %then.0
22         ret void
23
24 return:         ; preds = %entry, %then.0
25         ret void
26 }
27
28 declare void %__main()