1 ; RUN: opt -passes=instcombine < %s
2 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
3 target triple = "powerpc64-unknown-linux-gnu"
5 %struct.S0.0.1.2.3.4.13.22.31.44.48.53.54.55.56.58.59.60.66.68.70.74.77.106.107.108.109.110.113.117.118.128.129 = type <{ i64 }>
7 define void @main(i1 %c1, i1 %c2, i1 %c3, i1 %c4, i1 %c5, i1 %c6, i1 %c7, i1 %c8, i1 %c9, i1 %c10) {
9 %l_819.i.i = alloca %struct.S0.0.1.2.3.4.13.22.31.44.48.53.54.55.56.58.59.60.66.68.70.74.77.106.107.108.109.110.113.117.118.128.129, align 8
10 br i1 %c1, label %land.lhs.true, label %for.cond.i
12 land.lhs.true: ; preds = %entry
15 for.cond.i: ; preds = %land.lhs.true, %entry
16 br label %for.cond.i6.i.i
18 for.cond.i6.i.i: ; preds = %for.body.i8.i.i, %for.cond.i
19 br i1 %c2, label %for.body.i8.i.i, label %lbl_707.i.i.i
21 for.body.i8.i.i: ; preds = %for.cond.i6.i.i
22 br label %for.cond.i6.i.i
24 lbl_707.i.i.i: ; preds = %for.cond.i6.i.i
25 br i1 %c3, label %lor.rhs.i.i.i, label %lor.end.i.i.i
27 lor.rhs.i.i.i: ; preds = %lbl_707.i.i.i
28 br label %lor.end.i.i.i
30 lor.end.i.i.i: ; preds = %lor.rhs.i.i.i, %lbl_707.i.i.i
31 br label %for.cond1.i.i.i.i
33 for.cond1.i.i.i.i: ; preds = %for.body4.i.i.i.i, %lor.end.i.i.i
34 br i1 %c4, label %for.body4.i.i.i.i, label %func_39.exit.i.i
36 for.body4.i.i.i.i: ; preds = %for.cond1.i.i.i.i
37 br label %for.cond1.i.i.i.i
39 func_39.exit.i.i: ; preds = %for.cond1.i.i.i.i
40 %l_8191.sroa.0.0.copyload.i.i = load i64, ptr %l_819.i.i, align 1
41 br label %for.cond1.i.i.i
43 for.cond1.i.i.i: ; preds = %safe_div_func_uint32_t_u_u.exit.i.i.i, %func_39.exit.i.i
44 br i1 %c5, label %for.cond7.i.i.i, label %func_11.exit.i
46 for.cond7.i.i.i: ; preds = %for.end30.i.i.i, %for.cond1.i.i.i
47 %storemerge.i.i.i = phi i32 [ %sub.i.i.i, %for.end30.i.i.i ], [ 4, %for.cond1.i.i.i ]
48 br i1 %c6, label %for.cond22.i.i.i, label %for.end32.i.i.i
50 for.cond22.i.i.i: ; preds = %for.body25.i.i.i, %for.cond7.i.i.i
51 br i1 %c7, label %for.body25.i.i.i, label %for.end30.i.i.i
53 for.body25.i.i.i: ; preds = %for.cond22.i.i.i
54 br label %for.cond22.i.i.i
56 for.end30.i.i.i: ; preds = %for.cond22.i.i.i
57 %sub.i.i.i = add nsw i32 0, -1
58 br label %for.cond7.i.i.i
60 for.end32.i.i.i: ; preds = %for.cond7.i.i.i
61 %conv33.i.i.i = trunc i64 %l_8191.sroa.0.0.copyload.i.i to i32
62 %xor.i.i.i.i = xor i32 %storemerge.i.i.i, -701565022
63 %sub.i.i.i.i = sub nsw i32 0, %storemerge.i.i.i
64 %xor3.i.i.i.i = xor i32 %sub.i.i.i.i, %storemerge.i.i.i
65 %and4.i.i.i.i = and i32 %xor.i.i.i.i, %xor3.i.i.i.i
66 %cmp.i.i.i.i = icmp slt i32 %and4.i.i.i.i, 0
67 %sub5.i.i.i.i = sub nsw i32 -701565022, %storemerge.i.i.i
68 %.sub5.i.i.i.i = select i1 %cmp.i.i.i.i, i32 -701565022, i32 %sub5.i.i.i.i
69 br i1 %c8, label %safe_div_func_uint32_t_u_u.exit.i.i.i, label %cond.false.i.i.i.i
71 cond.false.i.i.i.i: ; preds = %for.end32.i.i.i
72 %div.i.i.i.i = udiv i32 %conv33.i.i.i, %.sub5.i.i.i.i
73 br label %safe_div_func_uint32_t_u_u.exit.i.i.i
75 safe_div_func_uint32_t_u_u.exit.i.i.i: ; preds = %cond.false.i.i.i.i, %for.end32.i.i.i
76 %cond.i.i.i.i = phi i32 [ %div.i.i.i.i, %cond.false.i.i.i.i ], [ %conv33.i.i.i, %for.end32.i.i.i ]
77 %cmp35.i.i.i = icmp ne i32 %cond.i.i.i.i, -7
78 br label %for.cond1.i.i.i
80 func_11.exit.i: ; preds = %for.cond1.i.i.i
81 br i1 %c9, label %for.body, label %for.end
83 for.body: ; preds = %func_11.exit.i
86 for.end: ; preds = %func_11.exit.i
89 for.cond15: ; preds = %for.cond19, %for.end
90 br i1 %c10, label %for.cond19, label %for.end45
92 for.cond19: ; preds = %for.cond15
95 for.end45: ; preds = %for.cond15