blob: bbc0bd78da7c86c43d66aa771422d29efeedf1c0 [file] [log] [blame]
Dan Gohmanf2f6ce62009-09-11 18:01:28 +00001; RUN: opt < %s -simplifycfg -disable-output
Chris Lattner07b5c9d2005-05-20 22:19:34 +00002
Tanya Lattnerf04d8d12008-03-18 03:45:45 +00003define void @NewExtractNames() {
Chris Lattner07b5c9d2005-05-20 22:19:34 +00004entry:
Tanya Lattnerf04d8d12008-03-18 03:45:45 +00005 br i1 false, label %endif.0, label %then.0
Chris Lattner07b5c9d2005-05-20 22:19:34 +00006then.0: ; preds = %entry
Tanya Lattnerf04d8d12008-03-18 03:45:45 +00007 br i1 false, label %shortcirc_next.i, label %shortcirc_done.i
Chris Lattner07b5c9d2005-05-20 22:19:34 +00008shortcirc_next.i: ; preds = %then.0
9 br label %shortcirc_done.i
Chris Lattner07b5c9d2005-05-20 22:19:34 +000010shortcirc_done.i: ; preds = %shortcirc_next.i, %then.0
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000011 br i1 false, label %then.0.i, label %else.0.i
Chris Lattner07b5c9d2005-05-20 22:19:34 +000012then.0.i: ; preds = %shortcirc_done.i
13 br label %NewBase.exit
Chris Lattner07b5c9d2005-05-20 22:19:34 +000014else.0.i: ; preds = %shortcirc_done.i
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000015 br i1 false, label %endif.0.i, label %else.1.i
Chris Lattner07b5c9d2005-05-20 22:19:34 +000016else.1.i: ; preds = %else.0.i
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000017 br i1 false, label %endif.0.i, label %else.2.i
Chris Lattner07b5c9d2005-05-20 22:19:34 +000018else.2.i: ; preds = %else.1.i
19 br label %NewBase.exit
Chris Lattner07b5c9d2005-05-20 22:19:34 +000020endif.0.i: ; preds = %else.1.i, %else.0.i
21 br label %NewBase.exit
Chris Lattner07b5c9d2005-05-20 22:19:34 +000022NewBase.exit: ; preds = %endif.0.i, %else.2.i, %then.0.i
23 br label %endif.0
Chris Lattner07b5c9d2005-05-20 22:19:34 +000024endif.0: ; preds = %NewBase.exit, %entry
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000025 %tmp.32.mask = and i32 0, 31 ; <i32> [#uses=1]
26 switch i32 %tmp.32.mask, label %label.9 [
27 i32 16, label %loopentry.2
28 i32 15, label %loopentry.2
29 i32 14, label %loopentry.2
30 i32 13, label %loopentry.2
31 i32 10, label %loopentry.2
32 i32 20, label %loopentry.1
33 i32 19, label %loopentry.1
34 i32 2, label %loopentry.0
35 i32 0, label %switchexit
Chris Lattner07b5c9d2005-05-20 22:19:34 +000036 ]
Chris Lattner07b5c9d2005-05-20 22:19:34 +000037loopentry.0: ; preds = %endif.1, %endif.0
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000038 br i1 false, label %no_exit.0, label %switchexit
Chris Lattner07b5c9d2005-05-20 22:19:34 +000039no_exit.0: ; preds = %loopentry.0
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000040 br i1 false, label %then.1, label %else.1
Chris Lattner07b5c9d2005-05-20 22:19:34 +000041then.1: ; preds = %no_exit.0
42 br label %endif.1
Chris Lattner07b5c9d2005-05-20 22:19:34 +000043else.1: ; preds = %no_exit.0
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000044 br i1 false, label %shortcirc_next.0, label %shortcirc_done.0
Chris Lattner07b5c9d2005-05-20 22:19:34 +000045shortcirc_next.0: ; preds = %else.1
46 br label %shortcirc_done.0
Chris Lattner07b5c9d2005-05-20 22:19:34 +000047shortcirc_done.0: ; preds = %shortcirc_next.0, %else.1
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000048 br i1 false, label %then.2, label %endif.2
Chris Lattner07b5c9d2005-05-20 22:19:34 +000049then.2: ; preds = %shortcirc_done.0
50 br label %endif.2
Chris Lattner07b5c9d2005-05-20 22:19:34 +000051endif.2: ; preds = %then.2, %shortcirc_done.0
52 br label %endif.1
Chris Lattner07b5c9d2005-05-20 22:19:34 +000053endif.1: ; preds = %endif.2, %then.1
54 br label %loopentry.0
Chris Lattner07b5c9d2005-05-20 22:19:34 +000055loopentry.1: ; preds = %endif.3, %endif.0, %endif.0
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000056 br i1 false, label %no_exit.1, label %switchexit
Chris Lattner07b5c9d2005-05-20 22:19:34 +000057no_exit.1: ; preds = %loopentry.1
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000058 br i1 false, label %then.3, label %else.2
Chris Lattner07b5c9d2005-05-20 22:19:34 +000059then.3: ; preds = %no_exit.1
60 br label %endif.3
Chris Lattner07b5c9d2005-05-20 22:19:34 +000061else.2: ; preds = %no_exit.1
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000062 br i1 false, label %shortcirc_next.1, label %shortcirc_done.1
Chris Lattner07b5c9d2005-05-20 22:19:34 +000063shortcirc_next.1: ; preds = %else.2
64 br label %shortcirc_done.1
Chris Lattner07b5c9d2005-05-20 22:19:34 +000065shortcirc_done.1: ; preds = %shortcirc_next.1, %else.2
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000066 br i1 false, label %then.4, label %endif.4
Chris Lattner07b5c9d2005-05-20 22:19:34 +000067then.4: ; preds = %shortcirc_done.1
68 br label %endif.4
Chris Lattner07b5c9d2005-05-20 22:19:34 +000069endif.4: ; preds = %then.4, %shortcirc_done.1
70 br label %endif.3
Chris Lattner07b5c9d2005-05-20 22:19:34 +000071endif.3: ; preds = %endif.4, %then.3
72 br label %loopentry.1
Chris Lattner07b5c9d2005-05-20 22:19:34 +000073loopentry.2: ; preds = %endif.5, %endif.0, %endif.0, %endif.0, %endif.0, %endif.0
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000074 %i.3 = phi i32 [ 0, %endif.5 ], [ 0, %endif.0 ], [ 0, %endif.0 ], [ 0, %endif.0 ], [ 0, %endif.0 ], [ 0, %endif.0 ] ; <i32> [#uses=1]
75 %tmp.158 = icmp slt i32 %i.3, 0 ; <i1> [#uses=1]
76 br i1 %tmp.158, label %no_exit.2, label %switchexit
Chris Lattner07b5c9d2005-05-20 22:19:34 +000077no_exit.2: ; preds = %loopentry.2
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000078 br i1 false, label %shortcirc_next.2, label %shortcirc_done.2
Chris Lattner07b5c9d2005-05-20 22:19:34 +000079shortcirc_next.2: ; preds = %no_exit.2
80 br label %shortcirc_done.2
Chris Lattner07b5c9d2005-05-20 22:19:34 +000081shortcirc_done.2: ; preds = %shortcirc_next.2, %no_exit.2
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000082 br i1 false, label %then.5, label %endif.5
Chris Lattner07b5c9d2005-05-20 22:19:34 +000083then.5: ; preds = %shortcirc_done.2
84 br label %endif.5
Chris Lattner07b5c9d2005-05-20 22:19:34 +000085endif.5: ; preds = %then.5, %shortcirc_done.2
86 br label %loopentry.2
Chris Lattner07b5c9d2005-05-20 22:19:34 +000087label.9: ; preds = %endif.0
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000088 br i1 false, label %then.6, label %endif.6
Chris Lattner07b5c9d2005-05-20 22:19:34 +000089then.6: ; preds = %label.9
90 br label %endif.6
Chris Lattner07b5c9d2005-05-20 22:19:34 +000091endif.6: ; preds = %then.6, %label.9
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000092 store i32 0, i32* null
Chris Lattner07b5c9d2005-05-20 22:19:34 +000093 br label %switchexit
Chris Lattner07b5c9d2005-05-20 22:19:34 +000094switchexit: ; preds = %endif.6, %loopentry.2, %loopentry.1, %loopentry.0, %endif.0
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000095 br i1 false, label %endif.7, label %then.7
Chris Lattner07b5c9d2005-05-20 22:19:34 +000096then.7: ; preds = %switchexit
Tanya Lattnerf04d8d12008-03-18 03:45:45 +000097 br i1 false, label %shortcirc_next.3, label %shortcirc_done.3
Chris Lattner07b5c9d2005-05-20 22:19:34 +000098shortcirc_next.3: ; preds = %then.7
99 br label %shortcirc_done.3
Chris Lattner07b5c9d2005-05-20 22:19:34 +0000100shortcirc_done.3: ; preds = %shortcirc_next.3, %then.7
Tanya Lattnerf04d8d12008-03-18 03:45:45 +0000101 br i1 false, label %then.8, label %endif.8
Chris Lattner07b5c9d2005-05-20 22:19:34 +0000102then.8: ; preds = %shortcirc_done.3
103 br label %endif.8
Chris Lattner07b5c9d2005-05-20 22:19:34 +0000104endif.8: ; preds = %then.8, %shortcirc_done.3
105 br label %endif.7
Chris Lattner07b5c9d2005-05-20 22:19:34 +0000106endif.7: ; preds = %endif.8, %switchexit
107 ret void
108}