1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -disable-cgp-branch-opts -arm-atomic-cfg-tidy=0 | FileCheck %s
%struct.pix_pos = type { i32, i32, i32, i32, i32, i32 }
@getNeighbour = external global void (i32, i32, i32, i32, %struct.pix_pos*)*, align 4 ; <void (i32, i32, i32, i32, %struct.pix_pos*)**> [#uses=2]
define void @t() nounwind {
; CHECK-LABEL: t:
; CHECK: it eq
; CHECK-NEXT: cmpeq
entry:
%pix_a.i294 = alloca [4 x %struct.pix_pos], align 4 ; <[4 x %struct.pix_pos]*> [#uses=2]
br i1 undef, label %land.rhs, label %lor.end
land.rhs: ; preds = %entry
br label %lor.end
lor.end: ; preds = %land.rhs, %entry
switch i32 0, label %if.end371 [
i32 10, label %if.then366
i32 14, label %if.then366
]
if.then366: ; preds = %lor.end, %lor.end
unreachable
if.end371: ; preds = %lor.end
%arrayidx56.2.i = getelementptr [4 x %struct.pix_pos], [4 x %struct.pix_pos]* %pix_a.i294, i32 0, i32 2 ; <%struct.pix_pos*> [#uses=1]
%arrayidx56.3.i = getelementptr [4 x %struct.pix_pos], [4 x %struct.pix_pos]* %pix_a.i294, i32 0, i32 3 ; <%struct.pix_pos*> [#uses=1]
br i1 undef, label %for.body1857, label %for.end4557
for.body1857: ; preds = %if.end371
br i1 undef, label %if.then1867, label %for.cond1933
if.then1867: ; preds = %for.body1857
unreachable
for.cond1933: ; preds = %for.body1857
br i1 undef, label %for.body1940, label %if.then4493
for.body1940: ; preds = %for.cond1933
%shl = shl i32 undef, 2 ; <i32> [#uses=1]
%shl1959 = shl i32 undef, 2 ; <i32> [#uses=4]
br i1 undef, label %if.then1992, label %if.else2003
if.then1992: ; preds = %for.body1940
%tmp14.i302 = load i32, i32* undef ; <i32> [#uses=4]
%add.i307452 = or i32 %shl1959, 1 ; <i32> [#uses=1]
%sub.i308 = add i32 %shl, -1 ; <i32> [#uses=4]
call void undef(i32 %tmp14.i302, i32 %sub.i308, i32 %shl1959, i32 0, %struct.pix_pos* undef) nounwind
%tmp49.i309 = load void (i32, i32, i32, i32, %struct.pix_pos*)*, void (i32, i32, i32, i32, %struct.pix_pos*)** @getNeighbour ; <void (i32, i32, i32, i32, %struct.pix_pos*)*> [#uses=1]
call void %tmp49.i309(i32 %tmp14.i302, i32 %sub.i308, i32 %add.i307452, i32 0, %struct.pix_pos* null) nounwind
%tmp49.1.i = load void (i32, i32, i32, i32, %struct.pix_pos*)*, void (i32, i32, i32, i32, %struct.pix_pos*)** @getNeighbour ; <void (i32, i32, i32, i32, %struct.pix_pos*)*> [#uses=1]
call void %tmp49.1.i(i32 %tmp14.i302, i32 %sub.i308, i32 undef, i32 0, %struct.pix_pos* %arrayidx56.2.i) nounwind
call void undef(i32 %tmp14.i302, i32 %sub.i308, i32 undef, i32 0, %struct.pix_pos* %arrayidx56.3.i) nounwind
unreachable
if.else2003: ; preds = %for.body1940
switch i32 undef, label %if.then2015 [
i32 10, label %if.then4382
i32 14, label %if.then4382
]
if.then2015: ; preds = %if.else2003
br i1 undef, label %if.else2298, label %if.then2019
if.then2019: ; preds = %if.then2015
br i1 undef, label %if.then2065, label %if.else2081
if.then2065: ; preds = %if.then2019
br label %if.end2128
if.else2081: ; preds = %if.then2019
br label %if.end2128
if.end2128: ; preds = %if.else2081, %if.then2065
unreachable
if.else2298: ; preds = %if.then2015
br i1 undef, label %land.lhs.true2813, label %cond.end2841
land.lhs.true2813: ; preds = %if.else2298
br i1 undef, label %cond.end2841, label %cond.true2824
cond.true2824: ; preds = %land.lhs.true2813
br label %cond.end2841
cond.end2841: ; preds = %cond.true2824, %land.lhs.true2813, %if.else2298
br i1 undef, label %for.cond2882.preheader, label %for.cond2940.preheader
for.cond2882.preheader: ; preds = %cond.end2841
%mul3693 = shl i32 undef, 1 ; <i32> [#uses=2]
br i1 undef, label %if.then3689, label %if.else3728
for.cond2940.preheader: ; preds = %cond.end2841
br label %for.inc3040
for.inc3040: ; preds = %for.inc3040, %for.cond2940.preheader
br label %for.inc3040
if.then3689: ; preds = %for.cond2882.preheader
%add3695 = add nsw i32 %mul3693, %shl1959 ; <i32> [#uses=1]
%mul3697 = shl i32 %add3695, 2 ; <i32> [#uses=2]
%arrayidx3705 = getelementptr inbounds i16, i16* undef, i32 1 ; <i16*> [#uses=1]
%tmp3706 = load i16, i16* %arrayidx3705 ; <i16> [#uses=1]
%conv3707 = sext i16 %tmp3706 to i32 ; <i32> [#uses=1]
%add3708 = add nsw i32 %conv3707, %mul3697 ; <i32> [#uses=1]
%arrayidx3724 = getelementptr inbounds i16, i16* null, i32 1 ; <i16*> [#uses=1]
%tmp3725 = load i16, i16* %arrayidx3724 ; <i16> [#uses=1]
%conv3726 = sext i16 %tmp3725 to i32 ; <i32> [#uses=1]
%add3727 = add nsw i32 %conv3726, %mul3697 ; <i32> [#uses=1]
br label %if.end3770
if.else3728: ; preds = %for.cond2882.preheader
%mul3733 = add i32 %shl1959, 1073741816 ; <i32> [#uses=1]
%add3735 = add nsw i32 %mul3733, %mul3693 ; <i32> [#uses=1]
%mul3737 = shl i32 %add3735, 2 ; <i32> [#uses=2]
%tmp3746 = load i16, i16* undef ; <i16> [#uses=1]
%conv3747 = sext i16 %tmp3746 to i32 ; <i32> [#uses=1]
%add3748 = add nsw i32 %conv3747, %mul3737 ; <i32> [#uses=1]
%arrayidx3765 = getelementptr inbounds i16, i16* null, i32 1 ; <i16*> [#uses=1]
%tmp3766 = load i16, i16* %arrayidx3765 ; <i16> [#uses=1]
%conv3767 = sext i16 %tmp3766 to i32 ; <i32> [#uses=1]
%add3768 = add nsw i32 %conv3767, %mul3737 ; <i32> [#uses=1]
br label %if.end3770
if.end3770: ; preds = %if.else3728, %if.then3689
%vec2_y.1 = phi i32 [ %add3727, %if.then3689 ], [ %add3768, %if.else3728 ] ; <i32> [#uses=0]
%vec1_y.2 = phi i32 [ %add3708, %if.then3689 ], [ %add3748, %if.else3728 ] ; <i32> [#uses=0]
unreachable
if.then4382: ; preds = %if.else2003, %if.else2003
switch i32 undef, label %if.then4394 [
i32 10, label %if.else4400
i32 14, label %if.else4400
]
if.then4394: ; preds = %if.then4382
unreachable
if.else4400: ; preds = %if.then4382, %if.then4382
br label %for.cond4451.preheader
for.cond4451.preheader: ; preds = %for.cond4451.preheader, %if.else4400
br label %for.cond4451.preheader
if.then4493: ; preds = %for.cond1933
unreachable
for.end4557: ; preds = %if.end371
ret void
}
|