Model stacksave and stackrestore as both writing memory, since we
[oota-llvm.git] / test / Transforms / InstCombine / 2006-05-04-DemandedBitCrash.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output
2 ; END.
3
4 void %test() {
5 bb38.i:
6         %varspec.0.i1014 = cast long 123814269237067777 to ulong                ; <ulong> [#uses=1]
7         %locspec.0.i1015 = cast int 1 to uint           ; <uint> [#uses=2]
8         %tmp51391.i1018 = shr ulong %varspec.0.i1014, ubyte 16          ; <ulong> [#uses=1]
9         %tmp51392.i1019 = cast ulong %tmp51391.i1018 to uint            ; <uint> [#uses=2]
10         %tmp51392.mask.i1020 = shr uint %tmp51392.i1019, ubyte 29               ; <uint> [#uses=1]
11         %tmp7.i1021 = and uint %tmp51392.mask.i1020, 1          ; <uint> [#uses=2]
12         %tmp18.i1026 = shr uint %tmp51392.i1019, ubyte 31               ; <uint> [#uses=2]
13         %tmp18.i1027 = cast uint %tmp18.i1026 to ubyte          ; <ubyte> [#uses=1]
14         br bool false, label %cond_false1148.i1653, label %bb377.i1259
15
16 bb377.i1259:            ; preds = %bb38.i
17         br bool false, label %cond_true541.i1317, label %cond_false1148.i1653
18
19 cond_true541.i1317:             ; preds = %bb377.i1259
20         %tmp545.i1318 = shr uint %locspec.0.i1015, ubyte 10             ; <uint> [#uses=1]
21         %tmp550.i1319 = shr uint %locspec.0.i1015, ubyte 4              ; <uint> [#uses=1]
22         %tmp550551.i1320 = and uint %tmp550.i1319, 63           ; <uint> [#uses=1]
23         %tmp553.i1321 = setlt uint %tmp550551.i1320, 4          ; <bool> [#uses=1]
24         %tmp558.i1322 = seteq uint %tmp7.i1021, 0               ; <bool> [#uses=1]
25         %bothcond.i1326 = or bool %tmp553.i1321, false          ; <bool> [#uses=1]
26         %bothcond1.i1327 = or bool %bothcond.i1326, false               ; <bool> [#uses=1]
27         %bothcond2.not.i1328 = or bool %bothcond1.i1327, false          ; <bool> [#uses=1]
28         %bothcond3.i1329 = or bool %bothcond2.not.i1328, %tmp558.i1322          ; <bool> [#uses=0]
29         br bool false, label %cond_true583.i1333, label %cond_next592.i1337
30
31 cond_true583.i1333:             ; preds = %cond_true541.i1317
32         br bool false, label %cond_true586.i1335, label %cond_next592.i1337
33
34 cond_true586.i1335:             ; preds = %cond_true583.i1333
35         br label %cond_true.i
36
37 cond_next592.i1337:             ; preds = %cond_true583.i1333, %cond_true541.i1317
38         %mask_z.0.i1339 = phi uint [ %tmp18.i1026, %cond_true541.i1317 ], [ 0, %cond_true583.i1333 ]            ; <uint> [#uses=0]
39         %tmp594.i1340 = and uint %tmp545.i1318, 15              ; <uint> [#uses=0]
40         br label %cond_true.i
41
42 cond_false1148.i1653:           ; preds = %bb377.i1259, %bb38.i
43         %tmp1150.i1654 = seteq uint %tmp7.i1021, 0              ; <bool> [#uses=1]
44         %tmp1160.i1656 = seteq ubyte %tmp18.i1027, 0            ; <bool> [#uses=1]
45         %bothcond8.i1658 = or bool %tmp1150.i1654, %tmp1160.i1656               ; <bool> [#uses=1]
46         %bothcond9.i1659 = or bool %bothcond8.i1658, false              ; <bool> [#uses=0]
47         br label %cond_true.i
48
49 cond_true.i:            ; preds = %cond_false1148.i1653, %cond_next592.i1337, %cond_true586.i1335
50         ret void
51 }