1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -mtriple=amdgcn-- -amdgpu-codegenprepare -amdgpu-codegenprepare-force-break-large-phis -verify %s | FileCheck %s --check-prefixes=OPT
3 ; RUN: opt -S -mtriple=amdgcn-- -amdgpu-codegenprepare --global-isel %s | FileCheck %s --check-prefixes=NOOPT
4 ; RUN: opt -S -mtriple=amdgcn-- -amdgpu-codegenprepare -amdgpu-codegenprepare-break-large-phis=0 %s | FileCheck %s --check-prefixes=NOOPT
6 define amdgpu_kernel void @phi_v5f64(<5 x double> %in, ptr %out, i1 %cond) {
7 ; OPT-LABEL: @phi_v5f64(
9 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
11 ; OPT-NEXT: [[X:%.*]] = insertelement <5 x double> [[IN:%.*]], double 3.140000e+00, i32 3
12 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = extractelement <5 x double> [[X]], i64 0
13 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = extractelement <5 x double> [[X]], i64 1
14 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = extractelement <5 x double> [[X]], i64 2
15 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = extractelement <5 x double> [[X]], i64 3
16 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE8:%.*]] = extractelement <5 x double> [[X]], i64 4
17 ; OPT-NEXT: br label [[FINALLY:%.*]]
19 ; OPT-NEXT: [[Y:%.*]] = insertelement <5 x double> [[IN]], double 9.140000e+00, i32 2
20 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = extractelement <5 x double> [[Y]], i64 0
21 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = extractelement <5 x double> [[Y]], i64 1
22 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = extractelement <5 x double> [[Y]], i64 2
23 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = extractelement <5 x double> [[Y]], i64 3
24 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = extractelement <5 x double> [[Y]], i64 4
25 ; OPT-NEXT: br label [[FINALLY]]
27 ; OPT-NEXT: [[TMP0:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
28 ; OPT-NEXT: [[TMP1:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE2]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
29 ; OPT-NEXT: [[TMP2:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
30 ; OPT-NEXT: [[TMP3:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
31 ; OPT-NEXT: [[TMP4:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE8]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE9]], [[ELSE]] ]
32 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = insertelement <5 x double> poison, double [[TMP0]], i64 0
33 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE0]], double [[TMP1]], i64 1
34 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE1]], double [[TMP2]], i64 2
35 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE2]], double [[TMP3]], i64 3
36 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE3]], double [[TMP4]], i64 4
37 ; OPT-NEXT: store <5 x double> [[LARGEPHI_INSERTSLICE4]], ptr [[OUT:%.*]], align 1
40 ; NOOPT-LABEL: @phi_v5f64(
42 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
44 ; NOOPT-NEXT: [[X:%.*]] = insertelement <5 x double> [[IN:%.*]], double 3.140000e+00, i32 3
45 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
47 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <5 x double> [[IN]], double 9.140000e+00, i32 2
48 ; NOOPT-NEXT: br label [[FINALLY]]
50 ; NOOPT-NEXT: [[VAL:%.*]] = phi <5 x double> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ]
51 ; NOOPT-NEXT: store <5 x double> [[VAL]], ptr [[OUT:%.*]], align 1
52 ; NOOPT-NEXT: ret void
55 br i1 %cond, label %then, label %else
57 %x = insertelement <5 x double> %in, double 3.14, i32 3
60 %y = insertelement <5 x double> %in, double 9.14, i32 2
63 %val = phi <5 x double> [%x, %then], [%y, %else]
64 store <5 x double> %val, ptr %out, align 1
68 define amdgpu_kernel void @phi_v7f64(<7 x double> %in, ptr %out, i1 %cond) {
69 ; OPT-LABEL: @phi_v7f64(
71 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
73 ; OPT-NEXT: [[X:%.*]] = insertelement <7 x double> [[IN:%.*]], double 3.140000e+00, i32 3
74 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = extractelement <7 x double> [[X]], i64 0
75 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = extractelement <7 x double> [[X]], i64 1
76 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = extractelement <7 x double> [[X]], i64 2
77 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = extractelement <7 x double> [[X]], i64 3
78 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE8:%.*]] = extractelement <7 x double> [[X]], i64 4
79 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = extractelement <7 x double> [[X]], i64 5
80 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE12:%.*]] = extractelement <7 x double> [[X]], i64 6
81 ; OPT-NEXT: br label [[FINALLY:%.*]]
83 ; OPT-NEXT: [[Y:%.*]] = insertelement <7 x double> [[IN]], double 9.140000e+00, i32 6
84 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = extractelement <7 x double> [[Y]], i64 0
85 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = extractelement <7 x double> [[Y]], i64 1
86 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = extractelement <7 x double> [[Y]], i64 2
87 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = extractelement <7 x double> [[Y]], i64 3
88 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = extractelement <7 x double> [[Y]], i64 4
89 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE11:%.*]] = extractelement <7 x double> [[Y]], i64 5
90 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE13:%.*]] = extractelement <7 x double> [[Y]], i64 6
91 ; OPT-NEXT: br label [[FINALLY]]
93 ; OPT-NEXT: [[TMP0:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
94 ; OPT-NEXT: [[TMP1:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE2]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
95 ; OPT-NEXT: [[TMP2:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
96 ; OPT-NEXT: [[TMP3:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
97 ; OPT-NEXT: [[TMP4:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE8]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE9]], [[ELSE]] ]
98 ; OPT-NEXT: [[TMP5:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE10]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE11]], [[ELSE]] ]
99 ; OPT-NEXT: [[TMP6:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE12]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ]
100 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = insertelement <7 x double> poison, double [[TMP0]], i64 0
101 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = insertelement <7 x double> [[LARGEPHI_INSERTSLICE0]], double [[TMP1]], i64 1
102 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = insertelement <7 x double> [[LARGEPHI_INSERTSLICE1]], double [[TMP2]], i64 2
103 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <7 x double> [[LARGEPHI_INSERTSLICE2]], double [[TMP3]], i64 3
104 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = insertelement <7 x double> [[LARGEPHI_INSERTSLICE3]], double [[TMP4]], i64 4
105 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE5:%.*]] = insertelement <7 x double> [[LARGEPHI_INSERTSLICE4]], double [[TMP5]], i64 5
106 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE6:%.*]] = insertelement <7 x double> [[LARGEPHI_INSERTSLICE5]], double [[TMP6]], i64 6
107 ; OPT-NEXT: store <7 x double> [[LARGEPHI_INSERTSLICE6]], ptr [[OUT:%.*]], align 1
110 ; NOOPT-LABEL: @phi_v7f64(
112 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
114 ; NOOPT-NEXT: [[X:%.*]] = insertelement <7 x double> [[IN:%.*]], double 3.140000e+00, i32 3
115 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
117 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <7 x double> [[IN]], double 9.140000e+00, i32 6
118 ; NOOPT-NEXT: br label [[FINALLY]]
120 ; NOOPT-NEXT: [[VAL:%.*]] = phi <7 x double> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ]
121 ; NOOPT-NEXT: store <7 x double> [[VAL]], ptr [[OUT:%.*]], align 1
122 ; NOOPT-NEXT: ret void
125 br i1 %cond, label %then, label %else
127 %x = insertelement <7 x double> %in, double 3.14, i32 3
130 %y = insertelement <7 x double> %in, double 9.14, i32 6
133 %val = phi <7 x double> [%x, %then], [%y, %else]
134 store <7 x double> %val, ptr %out, align 1
138 define amdgpu_kernel void @phi_v11f64(<11 x double> %in, ptr %out, i1 %cond) {
139 ; OPT-LABEL: @phi_v11f64(
141 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
143 ; OPT-NEXT: [[X:%.*]] = insertelement <11 x double> [[IN:%.*]], double 3.140000e+00, i32 3
144 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = extractelement <11 x double> [[X]], i64 0
145 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = extractelement <11 x double> [[X]], i64 1
146 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = extractelement <11 x double> [[X]], i64 2
147 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = extractelement <11 x double> [[X]], i64 3
148 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE8:%.*]] = extractelement <11 x double> [[X]], i64 4
149 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = extractelement <11 x double> [[X]], i64 5
150 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE12:%.*]] = extractelement <11 x double> [[X]], i64 6
151 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE14:%.*]] = extractelement <11 x double> [[X]], i64 7
152 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE16:%.*]] = extractelement <11 x double> [[X]], i64 8
153 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE18:%.*]] = extractelement <11 x double> [[X]], i64 9
154 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE20:%.*]] = extractelement <11 x double> [[X]], i64 10
155 ; OPT-NEXT: br label [[FINALLY:%.*]]
157 ; OPT-NEXT: [[Y:%.*]] = insertelement <11 x double> [[IN]], double 9.140000e+00, i32 6
158 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = extractelement <11 x double> [[Y]], i64 0
159 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = extractelement <11 x double> [[Y]], i64 1
160 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = extractelement <11 x double> [[Y]], i64 2
161 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = extractelement <11 x double> [[Y]], i64 3
162 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = extractelement <11 x double> [[Y]], i64 4
163 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE11:%.*]] = extractelement <11 x double> [[Y]], i64 5
164 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE13:%.*]] = extractelement <11 x double> [[Y]], i64 6
165 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE15:%.*]] = extractelement <11 x double> [[Y]], i64 7
166 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE17:%.*]] = extractelement <11 x double> [[Y]], i64 8
167 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE19:%.*]] = extractelement <11 x double> [[Y]], i64 9
168 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE21:%.*]] = extractelement <11 x double> [[Y]], i64 10
169 ; OPT-NEXT: br label [[FINALLY]]
171 ; OPT-NEXT: [[TMP0:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
172 ; OPT-NEXT: [[TMP1:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE2]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
173 ; OPT-NEXT: [[TMP2:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
174 ; OPT-NEXT: [[TMP3:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
175 ; OPT-NEXT: [[TMP4:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE8]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE9]], [[ELSE]] ]
176 ; OPT-NEXT: [[TMP5:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE10]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE11]], [[ELSE]] ]
177 ; OPT-NEXT: [[TMP6:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE12]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ]
178 ; OPT-NEXT: [[TMP7:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE14]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE15]], [[ELSE]] ]
179 ; OPT-NEXT: [[TMP8:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE16]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE17]], [[ELSE]] ]
180 ; OPT-NEXT: [[TMP9:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE18]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE19]], [[ELSE]] ]
181 ; OPT-NEXT: [[TMP10:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE20]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE21]], [[ELSE]] ]
182 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = insertelement <11 x double> poison, double [[TMP0]], i64 0
183 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE0]], double [[TMP1]], i64 1
184 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE1]], double [[TMP2]], i64 2
185 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE2]], double [[TMP3]], i64 3
186 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE3]], double [[TMP4]], i64 4
187 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE5:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE4]], double [[TMP5]], i64 5
188 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE6:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE5]], double [[TMP6]], i64 6
189 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE7:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE6]], double [[TMP7]], i64 7
190 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE8:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE7]], double [[TMP8]], i64 8
191 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE9:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE8]], double [[TMP9]], i64 9
192 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE10:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE9]], double [[TMP10]], i64 10
193 ; OPT-NEXT: store <11 x double> [[LARGEPHI_INSERTSLICE10]], ptr [[OUT:%.*]], align 1
196 ; NOOPT-LABEL: @phi_v11f64(
198 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
200 ; NOOPT-NEXT: [[X:%.*]] = insertelement <11 x double> [[IN:%.*]], double 3.140000e+00, i32 3
201 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
203 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <11 x double> [[IN]], double 9.140000e+00, i32 6
204 ; NOOPT-NEXT: br label [[FINALLY]]
206 ; NOOPT-NEXT: [[VAL:%.*]] = phi <11 x double> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ]
207 ; NOOPT-NEXT: store <11 x double> [[VAL]], ptr [[OUT:%.*]], align 1
208 ; NOOPT-NEXT: ret void
211 br i1 %cond, label %then, label %else
213 %x = insertelement <11 x double> %in, double 3.14, i32 3
216 %y = insertelement <11 x double> %in, double 9.14, i32 6
219 %val = phi <11 x double> [%x, %then], [%y, %else]
220 store <11 x double> %val, ptr %out, align 1
224 define amdgpu_kernel void @phi_v11f64_cst(<11 x double> %in, ptr %out, i1 %cond) {
225 ; OPT-LABEL: @phi_v11f64_cst(
227 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[FINALLY:%.*]]
229 ; OPT-NEXT: [[X:%.*]] = insertelement <11 x double> [[IN:%.*]], double 3.140000e+00, i32 3
230 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = extractelement <11 x double> [[X]], i64 0
231 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = extractelement <11 x double> [[X]], i64 1
232 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = extractelement <11 x double> [[X]], i64 2
233 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = extractelement <11 x double> [[X]], i64 3
234 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE8:%.*]] = extractelement <11 x double> [[X]], i64 4
235 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = extractelement <11 x double> [[X]], i64 5
236 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE12:%.*]] = extractelement <11 x double> [[X]], i64 6
237 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE14:%.*]] = extractelement <11 x double> [[X]], i64 7
238 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE16:%.*]] = extractelement <11 x double> [[X]], i64 8
239 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE18:%.*]] = extractelement <11 x double> [[X]], i64 9
240 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE20:%.*]] = extractelement <11 x double> [[X]], i64 10
241 ; OPT-NEXT: br label [[FINALLY]]
243 ; OPT-NEXT: [[TMP0:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ 0.000000e+00, [[ENTRY:%.*]] ]
244 ; OPT-NEXT: [[TMP1:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE2]], [[THEN]] ], [ 0.000000e+00, [[ENTRY]] ]
245 ; OPT-NEXT: [[TMP2:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN]] ], [ 0.000000e+00, [[ENTRY]] ]
246 ; OPT-NEXT: [[TMP3:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ 0.000000e+00, [[ENTRY]] ]
247 ; OPT-NEXT: [[TMP4:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE8]], [[THEN]] ], [ 0.000000e+00, [[ENTRY]] ]
248 ; OPT-NEXT: [[TMP5:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE10]], [[THEN]] ], [ 0.000000e+00, [[ENTRY]] ]
249 ; OPT-NEXT: [[TMP6:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE12]], [[THEN]] ], [ 0.000000e+00, [[ENTRY]] ]
250 ; OPT-NEXT: [[TMP7:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE14]], [[THEN]] ], [ 0.000000e+00, [[ENTRY]] ]
251 ; OPT-NEXT: [[TMP8:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE16]], [[THEN]] ], [ 0.000000e+00, [[ENTRY]] ]
252 ; OPT-NEXT: [[TMP9:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE18]], [[THEN]] ], [ 0.000000e+00, [[ENTRY]] ]
253 ; OPT-NEXT: [[TMP10:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE20]], [[THEN]] ], [ 0.000000e+00, [[ENTRY]] ]
254 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = insertelement <11 x double> poison, double [[TMP0]], i64 0
255 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE0]], double [[TMP1]], i64 1
256 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE1]], double [[TMP2]], i64 2
257 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE2]], double [[TMP3]], i64 3
258 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE3]], double [[TMP4]], i64 4
259 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE5:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE4]], double [[TMP5]], i64 5
260 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE6:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE5]], double [[TMP6]], i64 6
261 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE7:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE6]], double [[TMP7]], i64 7
262 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE8:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE7]], double [[TMP8]], i64 8
263 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE9:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE8]], double [[TMP9]], i64 9
264 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE10:%.*]] = insertelement <11 x double> [[LARGEPHI_INSERTSLICE9]], double [[TMP10]], i64 10
265 ; OPT-NEXT: store <11 x double> [[LARGEPHI_INSERTSLICE10]], ptr [[OUT:%.*]], align 1
268 ; NOOPT-LABEL: @phi_v11f64_cst(
270 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[FINALLY:%.*]]
272 ; NOOPT-NEXT: [[X:%.*]] = insertelement <11 x double> [[IN:%.*]], double 3.140000e+00, i32 3
273 ; NOOPT-NEXT: br label [[FINALLY]]
275 ; NOOPT-NEXT: [[VAL:%.*]] = phi <11 x double> [ [[X]], [[THEN]] ], [ zeroinitializer, [[ENTRY:%.*]] ]
276 ; NOOPT-NEXT: store <11 x double> [[VAL]], ptr [[OUT:%.*]], align 1
277 ; NOOPT-NEXT: ret void
280 br i1 %cond, label %then, label %finally
282 %x = insertelement <11 x double> %in, double 3.14, i32 3
285 %val = phi <11 x double> [%x, %then], [zeroinitializer, %entry]
286 store <11 x double> %val, ptr %out, align 1
290 define amdgpu_kernel void @phi_v15i64(<15 x i64> %in, ptr %out, i1 %cond) {
291 ; OPT-LABEL: @phi_v15i64(
293 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
295 ; OPT-NEXT: [[X:%.*]] = insertelement <15 x i64> [[IN:%.*]], i64 42, i32 3
296 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = extractelement <15 x i64> [[X]], i64 0
297 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = extractelement <15 x i64> [[X]], i64 1
298 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = extractelement <15 x i64> [[X]], i64 2
299 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = extractelement <15 x i64> [[X]], i64 3
300 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE8:%.*]] = extractelement <15 x i64> [[X]], i64 4
301 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = extractelement <15 x i64> [[X]], i64 5
302 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE12:%.*]] = extractelement <15 x i64> [[X]], i64 6
303 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE14:%.*]] = extractelement <15 x i64> [[X]], i64 7
304 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE16:%.*]] = extractelement <15 x i64> [[X]], i64 8
305 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE18:%.*]] = extractelement <15 x i64> [[X]], i64 9
306 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE20:%.*]] = extractelement <15 x i64> [[X]], i64 10
307 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE22:%.*]] = extractelement <15 x i64> [[X]], i64 11
308 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE24:%.*]] = extractelement <15 x i64> [[X]], i64 12
309 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE26:%.*]] = extractelement <15 x i64> [[X]], i64 13
310 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE28:%.*]] = extractelement <15 x i64> [[X]], i64 14
311 ; OPT-NEXT: br label [[FINALLY:%.*]]
313 ; OPT-NEXT: [[Y:%.*]] = insertelement <15 x i64> [[IN]], i64 64, i32 6
314 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = extractelement <15 x i64> [[Y]], i64 0
315 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = extractelement <15 x i64> [[Y]], i64 1
316 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = extractelement <15 x i64> [[Y]], i64 2
317 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = extractelement <15 x i64> [[Y]], i64 3
318 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = extractelement <15 x i64> [[Y]], i64 4
319 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE11:%.*]] = extractelement <15 x i64> [[Y]], i64 5
320 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE13:%.*]] = extractelement <15 x i64> [[Y]], i64 6
321 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE15:%.*]] = extractelement <15 x i64> [[Y]], i64 7
322 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE17:%.*]] = extractelement <15 x i64> [[Y]], i64 8
323 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE19:%.*]] = extractelement <15 x i64> [[Y]], i64 9
324 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE21:%.*]] = extractelement <15 x i64> [[Y]], i64 10
325 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE23:%.*]] = extractelement <15 x i64> [[Y]], i64 11
326 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE25:%.*]] = extractelement <15 x i64> [[Y]], i64 12
327 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE27:%.*]] = extractelement <15 x i64> [[Y]], i64 13
328 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE29:%.*]] = extractelement <15 x i64> [[Y]], i64 14
329 ; OPT-NEXT: br label [[FINALLY]]
331 ; OPT-NEXT: [[TMP0:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
332 ; OPT-NEXT: [[TMP1:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE2]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
333 ; OPT-NEXT: [[TMP2:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
334 ; OPT-NEXT: [[TMP3:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
335 ; OPT-NEXT: [[TMP4:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE8]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE9]], [[ELSE]] ]
336 ; OPT-NEXT: [[TMP5:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE10]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE11]], [[ELSE]] ]
337 ; OPT-NEXT: [[TMP6:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE12]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ]
338 ; OPT-NEXT: [[TMP7:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE14]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE15]], [[ELSE]] ]
339 ; OPT-NEXT: [[TMP8:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE16]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE17]], [[ELSE]] ]
340 ; OPT-NEXT: [[TMP9:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE18]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE19]], [[ELSE]] ]
341 ; OPT-NEXT: [[TMP10:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE20]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE21]], [[ELSE]] ]
342 ; OPT-NEXT: [[TMP11:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE22]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE23]], [[ELSE]] ]
343 ; OPT-NEXT: [[TMP12:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE24]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE25]], [[ELSE]] ]
344 ; OPT-NEXT: [[TMP13:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE26]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE27]], [[ELSE]] ]
345 ; OPT-NEXT: [[TMP14:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE28]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE29]], [[ELSE]] ]
346 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = insertelement <15 x i64> poison, i64 [[TMP0]], i64 0
347 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE0]], i64 [[TMP1]], i64 1
348 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE1]], i64 [[TMP2]], i64 2
349 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE2]], i64 [[TMP3]], i64 3
350 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE3]], i64 [[TMP4]], i64 4
351 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE5:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE4]], i64 [[TMP5]], i64 5
352 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE6:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE5]], i64 [[TMP6]], i64 6
353 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE7:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE6]], i64 [[TMP7]], i64 7
354 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE8:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE7]], i64 [[TMP8]], i64 8
355 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE9:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE8]], i64 [[TMP9]], i64 9
356 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE10:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE9]], i64 [[TMP10]], i64 10
357 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE11:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE10]], i64 [[TMP11]], i64 11
358 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE12:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE11]], i64 [[TMP12]], i64 12
359 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE13:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE12]], i64 [[TMP13]], i64 13
360 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE14:%.*]] = insertelement <15 x i64> [[LARGEPHI_INSERTSLICE13]], i64 [[TMP14]], i64 14
361 ; OPT-NEXT: store <15 x i64> [[LARGEPHI_INSERTSLICE14]], ptr [[OUT:%.*]], align 1
364 ; NOOPT-LABEL: @phi_v15i64(
366 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
368 ; NOOPT-NEXT: [[X:%.*]] = insertelement <15 x i64> [[IN:%.*]], i64 42, i32 3
369 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
371 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <15 x i64> [[IN]], i64 64, i32 6
372 ; NOOPT-NEXT: br label [[FINALLY]]
374 ; NOOPT-NEXT: [[VAL:%.*]] = phi <15 x i64> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ]
375 ; NOOPT-NEXT: store <15 x i64> [[VAL]], ptr [[OUT:%.*]], align 1
376 ; NOOPT-NEXT: ret void
379 br i1 %cond, label %then, label %else
381 %x = insertelement <15 x i64> %in, i64 42, i32 3
384 %y = insertelement <15 x i64> %in, i64 64, i32 6
387 %val = phi <15 x i64> [%x, %then], [%y, %else]
388 store <15 x i64> %val, ptr %out, align 1
392 define amdgpu_kernel void @phi_v27i16(<27 x i16> %in, ptr %out, i1 %cond) {
393 ; OPT-LABEL: @phi_v27i16(
395 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
397 ; OPT-NEXT: [[X:%.*]] = insertelement <27 x i16> [[IN:%.*]], i16 42, i32 3
398 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 0, i32 1>
399 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 2, i32 3>
400 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 4, i32 5>
401 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 6, i32 7>
402 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE8:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 8, i32 9>
403 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 10, i32 11>
404 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE12:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 12, i32 13>
405 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE14:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 14, i32 15>
406 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE16:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 16, i32 17>
407 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE18:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 18, i32 19>
408 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE20:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 20, i32 21>
409 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE22:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 22, i32 23>
410 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE24:%.*]] = shufflevector <27 x i16> [[X]], <27 x i16> poison, <2 x i32> <i32 24, i32 25>
411 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE26:%.*]] = extractelement <27 x i16> [[X]], i64 26
412 ; OPT-NEXT: br label [[FINALLY:%.*]]
414 ; OPT-NEXT: [[Y:%.*]] = insertelement <27 x i16> [[IN]], i16 64, i32 6
415 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 0, i32 1>
416 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 2, i32 3>
417 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 4, i32 5>
418 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 6, i32 7>
419 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 8, i32 9>
420 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE11:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 10, i32 11>
421 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE13:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 12, i32 13>
422 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE15:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 14, i32 15>
423 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE17:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 16, i32 17>
424 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE19:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 18, i32 19>
425 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE21:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 20, i32 21>
426 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE23:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 22, i32 23>
427 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE25:%.*]] = shufflevector <27 x i16> [[Y]], <27 x i16> poison, <2 x i32> <i32 24, i32 25>
428 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE27:%.*]] = extractelement <27 x i16> [[Y]], i64 26
429 ; OPT-NEXT: br label [[FINALLY]]
431 ; OPT-NEXT: [[TMP0:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
432 ; OPT-NEXT: [[TMP1:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE2]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
433 ; OPT-NEXT: [[TMP2:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
434 ; OPT-NEXT: [[TMP3:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
435 ; OPT-NEXT: [[TMP4:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE8]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE9]], [[ELSE]] ]
436 ; OPT-NEXT: [[TMP5:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE10]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE11]], [[ELSE]] ]
437 ; OPT-NEXT: [[TMP6:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE12]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ]
438 ; OPT-NEXT: [[TMP7:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE14]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE15]], [[ELSE]] ]
439 ; OPT-NEXT: [[TMP8:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE16]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE17]], [[ELSE]] ]
440 ; OPT-NEXT: [[TMP9:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE18]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE19]], [[ELSE]] ]
441 ; OPT-NEXT: [[TMP10:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE20]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE21]], [[ELSE]] ]
442 ; OPT-NEXT: [[TMP11:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE22]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE23]], [[ELSE]] ]
443 ; OPT-NEXT: [[TMP12:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE24]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE25]], [[ELSE]] ]
444 ; OPT-NEXT: [[TMP13:%.*]] = phi i16 [ [[LARGEPHI_EXTRACTSLICE26]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE27]], [[ELSE]] ]
445 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> poison, <2 x i16> [[TMP0]], i64 0)
446 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE0]], <2 x i16> [[TMP1]], i64 2)
447 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE1]], <2 x i16> [[TMP2]], i64 4)
448 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE2]], <2 x i16> [[TMP3]], i64 6)
449 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE3]], <2 x i16> [[TMP4]], i64 8)
450 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE5:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE4]], <2 x i16> [[TMP5]], i64 10)
451 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE6:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE5]], <2 x i16> [[TMP6]], i64 12)
452 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE7:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE6]], <2 x i16> [[TMP7]], i64 14)
453 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE8:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE7]], <2 x i16> [[TMP8]], i64 16)
454 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE9:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE8]], <2 x i16> [[TMP9]], i64 18)
455 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE10:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE9]], <2 x i16> [[TMP10]], i64 20)
456 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE11:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE10]], <2 x i16> [[TMP11]], i64 22)
457 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE12:%.*]] = call <27 x i16> @llvm.vector.insert.v27i16.v2i16(<27 x i16> [[LARGEPHI_INSERTSLICE11]], <2 x i16> [[TMP12]], i64 24)
458 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE13:%.*]] = insertelement <27 x i16> [[LARGEPHI_INSERTSLICE12]], i16 [[TMP13]], i64 26
459 ; OPT-NEXT: store <27 x i16> [[LARGEPHI_INSERTSLICE13]], ptr [[OUT:%.*]], align 1
462 ; NOOPT-LABEL: @phi_v27i16(
464 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
466 ; NOOPT-NEXT: [[X:%.*]] = insertelement <27 x i16> [[IN:%.*]], i16 42, i32 3
467 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
469 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <27 x i16> [[IN]], i16 64, i32 6
470 ; NOOPT-NEXT: br label [[FINALLY]]
472 ; NOOPT-NEXT: [[VAL:%.*]] = phi <27 x i16> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ]
473 ; NOOPT-NEXT: store <27 x i16> [[VAL]], ptr [[OUT:%.*]], align 1
474 ; NOOPT-NEXT: ret void
477 br i1 %cond, label %then, label %else
479 %x = insertelement <27 x i16> %in, i16 42, i32 3
482 %y = insertelement <27 x i16> %in, i16 64, i32 6
485 %val = phi <27 x i16> [%x, %then], [%y, %else]
486 store <27 x i16> %val, ptr %out, align 1
491 define amdgpu_kernel void @phi_v23i8(<23 x i8> %in, ptr %out, i1 %cond) {
492 ; OPT-LABEL: @phi_v23i8(
494 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
496 ; OPT-NEXT: [[X:%.*]] = insertelement <23 x i8> [[IN:%.*]], i8 42, i32 3
497 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = shufflevector <23 x i8> [[X]], <23 x i8> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
498 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = shufflevector <23 x i8> [[X]], <23 x i8> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
499 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = shufflevector <23 x i8> [[X]], <23 x i8> poison, <4 x i32> <i32 8, i32 9, i32 10, i32 11>
500 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = shufflevector <23 x i8> [[X]], <23 x i8> poison, <4 x i32> <i32 12, i32 13, i32 14, i32 15>
501 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE8:%.*]] = shufflevector <23 x i8> [[X]], <23 x i8> poison, <4 x i32> <i32 16, i32 17, i32 18, i32 19>
502 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = extractelement <23 x i8> [[X]], i64 20
503 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE12:%.*]] = extractelement <23 x i8> [[X]], i64 21
504 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE14:%.*]] = extractelement <23 x i8> [[X]], i64 22
505 ; OPT-NEXT: br label [[FINALLY:%.*]]
507 ; OPT-NEXT: [[Y:%.*]] = insertelement <23 x i8> [[IN]], i8 64, i32 6
508 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = shufflevector <23 x i8> [[Y]], <23 x i8> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
509 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = shufflevector <23 x i8> [[Y]], <23 x i8> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
510 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = shufflevector <23 x i8> [[Y]], <23 x i8> poison, <4 x i32> <i32 8, i32 9, i32 10, i32 11>
511 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = shufflevector <23 x i8> [[Y]], <23 x i8> poison, <4 x i32> <i32 12, i32 13, i32 14, i32 15>
512 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = shufflevector <23 x i8> [[Y]], <23 x i8> poison, <4 x i32> <i32 16, i32 17, i32 18, i32 19>
513 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE11:%.*]] = extractelement <23 x i8> [[Y]], i64 20
514 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE13:%.*]] = extractelement <23 x i8> [[Y]], i64 21
515 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE15:%.*]] = extractelement <23 x i8> [[Y]], i64 22
516 ; OPT-NEXT: br label [[FINALLY]]
518 ; OPT-NEXT: [[TMP0:%.*]] = phi <4 x i8> [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
519 ; OPT-NEXT: [[TMP1:%.*]] = phi <4 x i8> [ [[LARGEPHI_EXTRACTSLICE2]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
520 ; OPT-NEXT: [[TMP2:%.*]] = phi <4 x i8> [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
521 ; OPT-NEXT: [[TMP3:%.*]] = phi <4 x i8> [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
522 ; OPT-NEXT: [[TMP4:%.*]] = phi <4 x i8> [ [[LARGEPHI_EXTRACTSLICE8]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE9]], [[ELSE]] ]
523 ; OPT-NEXT: [[TMP5:%.*]] = phi i8 [ [[LARGEPHI_EXTRACTSLICE10]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE11]], [[ELSE]] ]
524 ; OPT-NEXT: [[TMP6:%.*]] = phi i8 [ [[LARGEPHI_EXTRACTSLICE12]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ]
525 ; OPT-NEXT: [[TMP7:%.*]] = phi i8 [ [[LARGEPHI_EXTRACTSLICE14]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE15]], [[ELSE]] ]
526 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = call <23 x i8> @llvm.vector.insert.v23i8.v4i8(<23 x i8> poison, <4 x i8> [[TMP0]], i64 0)
527 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = call <23 x i8> @llvm.vector.insert.v23i8.v4i8(<23 x i8> [[LARGEPHI_INSERTSLICE0]], <4 x i8> [[TMP1]], i64 4)
528 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = call <23 x i8> @llvm.vector.insert.v23i8.v4i8(<23 x i8> [[LARGEPHI_INSERTSLICE1]], <4 x i8> [[TMP2]], i64 8)
529 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = call <23 x i8> @llvm.vector.insert.v23i8.v4i8(<23 x i8> [[LARGEPHI_INSERTSLICE2]], <4 x i8> [[TMP3]], i64 12)
530 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = call <23 x i8> @llvm.vector.insert.v23i8.v4i8(<23 x i8> [[LARGEPHI_INSERTSLICE3]], <4 x i8> [[TMP4]], i64 16)
531 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE5:%.*]] = insertelement <23 x i8> [[LARGEPHI_INSERTSLICE4]], i8 [[TMP5]], i64 20
532 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE6:%.*]] = insertelement <23 x i8> [[LARGEPHI_INSERTSLICE5]], i8 [[TMP6]], i64 21
533 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE7:%.*]] = insertelement <23 x i8> [[LARGEPHI_INSERTSLICE6]], i8 [[TMP7]], i64 22
534 ; OPT-NEXT: store <23 x i8> [[LARGEPHI_INSERTSLICE7]], ptr [[OUT:%.*]], align 1
537 ; NOOPT-LABEL: @phi_v23i8(
539 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
541 ; NOOPT-NEXT: [[X:%.*]] = insertelement <23 x i8> [[IN:%.*]], i8 42, i32 3
542 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
544 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <23 x i8> [[IN]], i8 64, i32 6
545 ; NOOPT-NEXT: br label [[FINALLY]]
547 ; NOOPT-NEXT: [[VAL:%.*]] = phi <23 x i8> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ]
548 ; NOOPT-NEXT: store <23 x i8> [[VAL]], ptr [[OUT:%.*]], align 1
549 ; NOOPT-NEXT: ret void
552 br i1 %cond, label %then, label %else
554 %x = insertelement <23 x i8> %in, i8 42, i32 3
557 %y = insertelement <23 x i8> %in, i8 64, i32 6
560 %val = phi <23 x i8> [%x, %then], [%y, %else]
561 store <23 x i8> %val, ptr %out, align 1
566 define amdgpu_kernel void @phi_v23i8_zeroinit(<23 x i8> %in, ptr %out, i1 %cond) {
567 ; OPT-LABEL: @phi_v23i8_zeroinit(
569 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
571 ; OPT-NEXT: br label [[FINALLY:%.*]]
573 ; OPT-NEXT: [[Y:%.*]] = insertelement <23 x i8> [[IN:%.*]], i8 64, i32 6
574 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = shufflevector <23 x i8> [[Y]], <23 x i8> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
575 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = shufflevector <23 x i8> [[Y]], <23 x i8> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
576 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = shufflevector <23 x i8> [[Y]], <23 x i8> poison, <4 x i32> <i32 8, i32 9, i32 10, i32 11>
577 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = shufflevector <23 x i8> [[Y]], <23 x i8> poison, <4 x i32> <i32 12, i32 13, i32 14, i32 15>
578 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = shufflevector <23 x i8> [[Y]], <23 x i8> poison, <4 x i32> <i32 16, i32 17, i32 18, i32 19>
579 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE11:%.*]] = extractelement <23 x i8> [[Y]], i64 20
580 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE13:%.*]] = extractelement <23 x i8> [[Y]], i64 21
581 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE15:%.*]] = extractelement <23 x i8> [[Y]], i64 22
582 ; OPT-NEXT: br label [[FINALLY]]
584 ; OPT-NEXT: [[TMP0:%.*]] = phi <4 x i8> [ zeroinitializer, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
585 ; OPT-NEXT: [[TMP1:%.*]] = phi <4 x i8> [ zeroinitializer, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
586 ; OPT-NEXT: [[TMP2:%.*]] = phi <4 x i8> [ zeroinitializer, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
587 ; OPT-NEXT: [[TMP3:%.*]] = phi <4 x i8> [ zeroinitializer, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
588 ; OPT-NEXT: [[TMP4:%.*]] = phi <4 x i8> [ zeroinitializer, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE9]], [[ELSE]] ]
589 ; OPT-NEXT: [[TMP5:%.*]] = phi i8 [ 0, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE11]], [[ELSE]] ]
590 ; OPT-NEXT: [[TMP6:%.*]] = phi i8 [ 0, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ]
591 ; OPT-NEXT: [[TMP7:%.*]] = phi i8 [ 0, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE15]], [[ELSE]] ]
592 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = call <23 x i8> @llvm.vector.insert.v23i8.v4i8(<23 x i8> poison, <4 x i8> [[TMP0]], i64 0)
593 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = call <23 x i8> @llvm.vector.insert.v23i8.v4i8(<23 x i8> [[LARGEPHI_INSERTSLICE0]], <4 x i8> [[TMP1]], i64 4)
594 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = call <23 x i8> @llvm.vector.insert.v23i8.v4i8(<23 x i8> [[LARGEPHI_INSERTSLICE1]], <4 x i8> [[TMP2]], i64 8)
595 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = call <23 x i8> @llvm.vector.insert.v23i8.v4i8(<23 x i8> [[LARGEPHI_INSERTSLICE2]], <4 x i8> [[TMP3]], i64 12)
596 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = call <23 x i8> @llvm.vector.insert.v23i8.v4i8(<23 x i8> [[LARGEPHI_INSERTSLICE3]], <4 x i8> [[TMP4]], i64 16)
597 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE5:%.*]] = insertelement <23 x i8> [[LARGEPHI_INSERTSLICE4]], i8 [[TMP5]], i64 20
598 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE6:%.*]] = insertelement <23 x i8> [[LARGEPHI_INSERTSLICE5]], i8 [[TMP6]], i64 21
599 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE7:%.*]] = insertelement <23 x i8> [[LARGEPHI_INSERTSLICE6]], i8 [[TMP7]], i64 22
600 ; OPT-NEXT: store <23 x i8> [[LARGEPHI_INSERTSLICE7]], ptr [[OUT:%.*]], align 1
603 ; NOOPT-LABEL: @phi_v23i8_zeroinit(
605 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
607 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
609 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <23 x i8> [[IN:%.*]], i8 64, i32 6
610 ; NOOPT-NEXT: br label [[FINALLY]]
612 ; NOOPT-NEXT: [[VAL:%.*]] = phi <23 x i8> [ zeroinitializer, [[THEN]] ], [ [[Y]], [[ELSE]] ]
613 ; NOOPT-NEXT: store <23 x i8> [[VAL]], ptr [[OUT:%.*]], align 1
614 ; NOOPT-NEXT: ret void
617 br i1 %cond, label %then, label %else
621 %y = insertelement <23 x i8> %in, i8 64, i32 6
624 %val = phi <23 x i8> [zeroinitializer, %then], [%y, %else]
625 store <23 x i8> %val, ptr %out, align 1
629 define amdgpu_kernel void @phi_v15i8_random_constant_init(<15 x i8> %in, ptr %out, i1 %cond) {
630 ; OPT-LABEL: @phi_v15i8_random_constant_init(
632 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
634 ; OPT-NEXT: br label [[FINALLY:%.*]]
636 ; OPT-NEXT: [[Y:%.*]] = insertelement <15 x i8> [[IN:%.*]], i8 64, i32 6
637 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = shufflevector <15 x i8> [[Y]], <15 x i8> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
638 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = shufflevector <15 x i8> [[Y]], <15 x i8> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
639 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = shufflevector <15 x i8> [[Y]], <15 x i8> poison, <4 x i32> <i32 8, i32 9, i32 10, i32 11>
640 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = extractelement <15 x i8> [[Y]], i64 12
641 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = extractelement <15 x i8> [[Y]], i64 13
642 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE11:%.*]] = extractelement <15 x i8> [[Y]], i64 14
643 ; OPT-NEXT: br label [[FINALLY]]
645 ; OPT-NEXT: [[TMP0:%.*]] = phi <4 x i8> [ <i8 poison, i8 1, i8 2, i8 3>, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
646 ; OPT-NEXT: [[TMP1:%.*]] = phi <4 x i8> [ <i8 4, i8 undef, i8 6, i8 7>, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
647 ; OPT-NEXT: [[TMP2:%.*]] = phi <4 x i8> [ <i8 9, i8 10, i8 11, i8 12>, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
648 ; OPT-NEXT: [[TMP3:%.*]] = phi i8 [ 13, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
649 ; OPT-NEXT: [[TMP4:%.*]] = phi i8 [ 14, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE9]], [[ELSE]] ]
650 ; OPT-NEXT: [[TMP5:%.*]] = phi i8 [ undef, [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE11]], [[ELSE]] ]
651 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = call <15 x i8> @llvm.vector.insert.v15i8.v4i8(<15 x i8> poison, <4 x i8> [[TMP0]], i64 0)
652 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = call <15 x i8> @llvm.vector.insert.v15i8.v4i8(<15 x i8> [[LARGEPHI_INSERTSLICE0]], <4 x i8> [[TMP1]], i64 4)
653 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = call <15 x i8> @llvm.vector.insert.v15i8.v4i8(<15 x i8> [[LARGEPHI_INSERTSLICE1]], <4 x i8> [[TMP2]], i64 8)
654 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <15 x i8> [[LARGEPHI_INSERTSLICE2]], i8 [[TMP3]], i64 12
655 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = insertelement <15 x i8> [[LARGEPHI_INSERTSLICE3]], i8 [[TMP4]], i64 13
656 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE5:%.*]] = insertelement <15 x i8> [[LARGEPHI_INSERTSLICE4]], i8 [[TMP5]], i64 14
657 ; OPT-NEXT: store <15 x i8> [[LARGEPHI_INSERTSLICE5]], ptr [[OUT:%.*]], align 1
660 ; NOOPT-LABEL: @phi_v15i8_random_constant_init(
662 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
664 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
666 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <15 x i8> [[IN:%.*]], i8 64, i32 6
667 ; NOOPT-NEXT: br label [[FINALLY]]
669 ; NOOPT-NEXT: [[VAL:%.*]] = phi <15 x i8> [ <i8 poison, i8 1, i8 2, i8 3, i8 4, i8 undef, i8 6, i8 7, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 undef>, [[THEN]] ], [ [[Y]], [[ELSE]] ]
670 ; NOOPT-NEXT: store <15 x i8> [[VAL]], ptr [[OUT:%.*]], align 1
671 ; NOOPT-NEXT: ret void
674 br i1 %cond, label %then, label %else
678 %y = insertelement <15 x i8> %in, i8 64, i32 6
681 %val = phi <15 x i8> [<i8 poison, i8 1, i8 2, i8 3, i8 4, i8 undef, i8 6, i8 7, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 undef>, %then], [%y, %else]
682 store <15 x i8> %val, ptr %out, align 1
686 define amdgpu_kernel void @phi_v23i32(<23 x i32> %in, ptr %out, i1 %cond) {
687 ; OPT-LABEL: @phi_v23i32(
689 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
691 ; OPT-NEXT: [[X:%.*]] = insertelement <23 x i32> [[IN:%.*]], i32 42, i32 3
692 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = extractelement <23 x i32> [[X]], i64 0
693 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = extractelement <23 x i32> [[X]], i64 1
694 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = extractelement <23 x i32> [[X]], i64 2
695 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = extractelement <23 x i32> [[X]], i64 3
696 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE8:%.*]] = extractelement <23 x i32> [[X]], i64 4
697 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = extractelement <23 x i32> [[X]], i64 5
698 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE12:%.*]] = extractelement <23 x i32> [[X]], i64 6
699 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE14:%.*]] = extractelement <23 x i32> [[X]], i64 7
700 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE16:%.*]] = extractelement <23 x i32> [[X]], i64 8
701 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE18:%.*]] = extractelement <23 x i32> [[X]], i64 9
702 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE20:%.*]] = extractelement <23 x i32> [[X]], i64 10
703 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE22:%.*]] = extractelement <23 x i32> [[X]], i64 11
704 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE24:%.*]] = extractelement <23 x i32> [[X]], i64 12
705 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE26:%.*]] = extractelement <23 x i32> [[X]], i64 13
706 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE28:%.*]] = extractelement <23 x i32> [[X]], i64 14
707 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE30:%.*]] = extractelement <23 x i32> [[X]], i64 15
708 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE32:%.*]] = extractelement <23 x i32> [[X]], i64 16
709 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE34:%.*]] = extractelement <23 x i32> [[X]], i64 17
710 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE36:%.*]] = extractelement <23 x i32> [[X]], i64 18
711 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE38:%.*]] = extractelement <23 x i32> [[X]], i64 19
712 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE40:%.*]] = extractelement <23 x i32> [[X]], i64 20
713 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE42:%.*]] = extractelement <23 x i32> [[X]], i64 21
714 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE44:%.*]] = extractelement <23 x i32> [[X]], i64 22
715 ; OPT-NEXT: br label [[FINALLY:%.*]]
717 ; OPT-NEXT: [[Y:%.*]] = insertelement <23 x i32> [[IN]], i32 64, i32 6
718 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = extractelement <23 x i32> [[Y]], i64 0
719 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = extractelement <23 x i32> [[Y]], i64 1
720 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = extractelement <23 x i32> [[Y]], i64 2
721 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = extractelement <23 x i32> [[Y]], i64 3
722 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = extractelement <23 x i32> [[Y]], i64 4
723 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE11:%.*]] = extractelement <23 x i32> [[Y]], i64 5
724 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE13:%.*]] = extractelement <23 x i32> [[Y]], i64 6
725 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE15:%.*]] = extractelement <23 x i32> [[Y]], i64 7
726 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE17:%.*]] = extractelement <23 x i32> [[Y]], i64 8
727 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE19:%.*]] = extractelement <23 x i32> [[Y]], i64 9
728 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE21:%.*]] = extractelement <23 x i32> [[Y]], i64 10
729 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE23:%.*]] = extractelement <23 x i32> [[Y]], i64 11
730 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE25:%.*]] = extractelement <23 x i32> [[Y]], i64 12
731 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE27:%.*]] = extractelement <23 x i32> [[Y]], i64 13
732 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE29:%.*]] = extractelement <23 x i32> [[Y]], i64 14
733 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE31:%.*]] = extractelement <23 x i32> [[Y]], i64 15
734 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE33:%.*]] = extractelement <23 x i32> [[Y]], i64 16
735 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE35:%.*]] = extractelement <23 x i32> [[Y]], i64 17
736 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE37:%.*]] = extractelement <23 x i32> [[Y]], i64 18
737 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE39:%.*]] = extractelement <23 x i32> [[Y]], i64 19
738 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE41:%.*]] = extractelement <23 x i32> [[Y]], i64 20
739 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE43:%.*]] = extractelement <23 x i32> [[Y]], i64 21
740 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE45:%.*]] = extractelement <23 x i32> [[Y]], i64 22
741 ; OPT-NEXT: br label [[FINALLY]]
743 ; OPT-NEXT: [[TMP0:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
744 ; OPT-NEXT: [[TMP1:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE2]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
745 ; OPT-NEXT: [[TMP2:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
746 ; OPT-NEXT: [[TMP3:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
747 ; OPT-NEXT: [[TMP4:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE8]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE9]], [[ELSE]] ]
748 ; OPT-NEXT: [[TMP5:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE10]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE11]], [[ELSE]] ]
749 ; OPT-NEXT: [[TMP6:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE12]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ]
750 ; OPT-NEXT: [[TMP7:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE14]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE15]], [[ELSE]] ]
751 ; OPT-NEXT: [[TMP8:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE16]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE17]], [[ELSE]] ]
752 ; OPT-NEXT: [[TMP9:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE18]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE19]], [[ELSE]] ]
753 ; OPT-NEXT: [[TMP10:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE20]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE21]], [[ELSE]] ]
754 ; OPT-NEXT: [[TMP11:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE22]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE23]], [[ELSE]] ]
755 ; OPT-NEXT: [[TMP12:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE24]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE25]], [[ELSE]] ]
756 ; OPT-NEXT: [[TMP13:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE26]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE27]], [[ELSE]] ]
757 ; OPT-NEXT: [[TMP14:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE28]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE29]], [[ELSE]] ]
758 ; OPT-NEXT: [[TMP15:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE30]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE31]], [[ELSE]] ]
759 ; OPT-NEXT: [[TMP16:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE32]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE33]], [[ELSE]] ]
760 ; OPT-NEXT: [[TMP17:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE34]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE35]], [[ELSE]] ]
761 ; OPT-NEXT: [[TMP18:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE36]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE37]], [[ELSE]] ]
762 ; OPT-NEXT: [[TMP19:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE38]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE39]], [[ELSE]] ]
763 ; OPT-NEXT: [[TMP20:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE40]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE41]], [[ELSE]] ]
764 ; OPT-NEXT: [[TMP21:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE42]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE43]], [[ELSE]] ]
765 ; OPT-NEXT: [[TMP22:%.*]] = phi i32 [ [[LARGEPHI_EXTRACTSLICE44]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE45]], [[ELSE]] ]
766 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = insertelement <23 x i32> poison, i32 [[TMP0]], i64 0
767 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE0]], i32 [[TMP1]], i64 1
768 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE1]], i32 [[TMP2]], i64 2
769 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE2]], i32 [[TMP3]], i64 3
770 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE3]], i32 [[TMP4]], i64 4
771 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE5:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE4]], i32 [[TMP5]], i64 5
772 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE6:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE5]], i32 [[TMP6]], i64 6
773 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE7:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE6]], i32 [[TMP7]], i64 7
774 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE8:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE7]], i32 [[TMP8]], i64 8
775 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE9:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE8]], i32 [[TMP9]], i64 9
776 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE10:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE9]], i32 [[TMP10]], i64 10
777 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE11:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE10]], i32 [[TMP11]], i64 11
778 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE12:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE11]], i32 [[TMP12]], i64 12
779 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE13:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE12]], i32 [[TMP13]], i64 13
780 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE14:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE13]], i32 [[TMP14]], i64 14
781 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE15:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE14]], i32 [[TMP15]], i64 15
782 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE16:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE15]], i32 [[TMP16]], i64 16
783 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE17:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE16]], i32 [[TMP17]], i64 17
784 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE18:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE17]], i32 [[TMP18]], i64 18
785 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE19:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE18]], i32 [[TMP19]], i64 19
786 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE20:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE19]], i32 [[TMP20]], i64 20
787 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE21:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE20]], i32 [[TMP21]], i64 21
788 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE22:%.*]] = insertelement <23 x i32> [[LARGEPHI_INSERTSLICE21]], i32 [[TMP22]], i64 22
789 ; OPT-NEXT: store <23 x i32> [[LARGEPHI_INSERTSLICE22]], ptr [[OUT:%.*]], align 1
792 ; NOOPT-LABEL: @phi_v23i32(
794 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
796 ; NOOPT-NEXT: [[X:%.*]] = insertelement <23 x i32> [[IN:%.*]], i32 42, i32 3
797 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
799 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <23 x i32> [[IN]], i32 64, i32 6
800 ; NOOPT-NEXT: br label [[FINALLY]]
802 ; NOOPT-NEXT: [[VAL:%.*]] = phi <23 x i32> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ]
803 ; NOOPT-NEXT: store <23 x i32> [[VAL]], ptr [[OUT:%.*]], align 1
804 ; NOOPT-NEXT: ret void
807 br i1 %cond, label %then, label %else
809 %x = insertelement <23 x i32> %in, i32 42, i32 3
812 %y = insertelement <23 x i32> %in, i32 64, i32 6
815 %val = phi <23 x i32> [%x, %then], [%y, %else]
816 store <23 x i32> %val, ptr %out, align 1
820 define amdgpu_kernel void @phi_v16i64(<16 x i64> %in, ptr %out, i1 %cond) {
821 ; OPT-LABEL: @phi_v16i64(
823 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
825 ; OPT-NEXT: [[X:%.*]] = insertelement <16 x i64> [[IN:%.*]], i64 42, i32 3
826 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = extractelement <16 x i64> [[X]], i64 0
827 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = extractelement <16 x i64> [[X]], i64 1
828 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = extractelement <16 x i64> [[X]], i64 2
829 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = extractelement <16 x i64> [[X]], i64 3
830 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE8:%.*]] = extractelement <16 x i64> [[X]], i64 4
831 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = extractelement <16 x i64> [[X]], i64 5
832 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE12:%.*]] = extractelement <16 x i64> [[X]], i64 6
833 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE14:%.*]] = extractelement <16 x i64> [[X]], i64 7
834 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE16:%.*]] = extractelement <16 x i64> [[X]], i64 8
835 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE18:%.*]] = extractelement <16 x i64> [[X]], i64 9
836 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE20:%.*]] = extractelement <16 x i64> [[X]], i64 10
837 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE22:%.*]] = extractelement <16 x i64> [[X]], i64 11
838 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE24:%.*]] = extractelement <16 x i64> [[X]], i64 12
839 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE26:%.*]] = extractelement <16 x i64> [[X]], i64 13
840 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE28:%.*]] = extractelement <16 x i64> [[X]], i64 14
841 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE30:%.*]] = extractelement <16 x i64> [[X]], i64 15
842 ; OPT-NEXT: br label [[FINALLY:%.*]]
844 ; OPT-NEXT: [[Y:%.*]] = insertelement <16 x i64> [[IN]], i64 64, i32 6
845 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = extractelement <16 x i64> [[Y]], i64 0
846 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = extractelement <16 x i64> [[Y]], i64 1
847 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = extractelement <16 x i64> [[Y]], i64 2
848 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = extractelement <16 x i64> [[Y]], i64 3
849 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = extractelement <16 x i64> [[Y]], i64 4
850 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE11:%.*]] = extractelement <16 x i64> [[Y]], i64 5
851 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE13:%.*]] = extractelement <16 x i64> [[Y]], i64 6
852 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE15:%.*]] = extractelement <16 x i64> [[Y]], i64 7
853 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE17:%.*]] = extractelement <16 x i64> [[Y]], i64 8
854 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE19:%.*]] = extractelement <16 x i64> [[Y]], i64 9
855 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE21:%.*]] = extractelement <16 x i64> [[Y]], i64 10
856 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE23:%.*]] = extractelement <16 x i64> [[Y]], i64 11
857 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE25:%.*]] = extractelement <16 x i64> [[Y]], i64 12
858 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE27:%.*]] = extractelement <16 x i64> [[Y]], i64 13
859 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE29:%.*]] = extractelement <16 x i64> [[Y]], i64 14
860 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE31:%.*]] = extractelement <16 x i64> [[Y]], i64 15
861 ; OPT-NEXT: br label [[FINALLY]]
863 ; OPT-NEXT: [[TMP0:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
864 ; OPT-NEXT: [[TMP1:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE2]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
865 ; OPT-NEXT: [[TMP2:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
866 ; OPT-NEXT: [[TMP3:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
867 ; OPT-NEXT: [[TMP4:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE8]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE9]], [[ELSE]] ]
868 ; OPT-NEXT: [[TMP5:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE10]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE11]], [[ELSE]] ]
869 ; OPT-NEXT: [[TMP6:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE12]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ]
870 ; OPT-NEXT: [[TMP7:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE14]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE15]], [[ELSE]] ]
871 ; OPT-NEXT: [[TMP8:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE16]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE17]], [[ELSE]] ]
872 ; OPT-NEXT: [[TMP9:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE18]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE19]], [[ELSE]] ]
873 ; OPT-NEXT: [[TMP10:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE20]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE21]], [[ELSE]] ]
874 ; OPT-NEXT: [[TMP11:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE22]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE23]], [[ELSE]] ]
875 ; OPT-NEXT: [[TMP12:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE24]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE25]], [[ELSE]] ]
876 ; OPT-NEXT: [[TMP13:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE26]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE27]], [[ELSE]] ]
877 ; OPT-NEXT: [[TMP14:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE28]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE29]], [[ELSE]] ]
878 ; OPT-NEXT: [[TMP15:%.*]] = phi i64 [ [[LARGEPHI_EXTRACTSLICE30]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE31]], [[ELSE]] ]
879 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = insertelement <16 x i64> poison, i64 [[TMP0]], i64 0
880 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE0]], i64 [[TMP1]], i64 1
881 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE1]], i64 [[TMP2]], i64 2
882 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE2]], i64 [[TMP3]], i64 3
883 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE3]], i64 [[TMP4]], i64 4
884 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE5:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE4]], i64 [[TMP5]], i64 5
885 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE6:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE5]], i64 [[TMP6]], i64 6
886 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE7:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE6]], i64 [[TMP7]], i64 7
887 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE8:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE7]], i64 [[TMP8]], i64 8
888 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE9:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE8]], i64 [[TMP9]], i64 9
889 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE10:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE9]], i64 [[TMP10]], i64 10
890 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE11:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE10]], i64 [[TMP11]], i64 11
891 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE12:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE11]], i64 [[TMP12]], i64 12
892 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE13:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE12]], i64 [[TMP13]], i64 13
893 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE14:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE13]], i64 [[TMP14]], i64 14
894 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE15:%.*]] = insertelement <16 x i64> [[LARGEPHI_INSERTSLICE14]], i64 [[TMP15]], i64 15
895 ; OPT-NEXT: store <16 x i64> [[LARGEPHI_INSERTSLICE15]], ptr [[OUT:%.*]], align 1
898 ; NOOPT-LABEL: @phi_v16i64(
900 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
902 ; NOOPT-NEXT: [[X:%.*]] = insertelement <16 x i64> [[IN:%.*]], i64 42, i32 3
903 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
905 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <16 x i64> [[IN]], i64 64, i32 6
906 ; NOOPT-NEXT: br label [[FINALLY]]
908 ; NOOPT-NEXT: [[VAL:%.*]] = phi <16 x i64> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ]
909 ; NOOPT-NEXT: store <16 x i64> [[VAL]], ptr [[OUT:%.*]], align 1
910 ; NOOPT-NEXT: ret void
913 br i1 %cond, label %then, label %else
915 %x = insertelement <16 x i64> %in, i64 42, i32 3
918 %y = insertelement <16 x i64> %in, i64 64, i32 6
921 %val = phi <16 x i64> [%x, %then], [%y, %else]
922 store <16 x i64> %val, ptr %out, align 1
926 define amdgpu_kernel void @phi_v7i16(<7 x i16> %in, ptr %out, i1 %cond) {
927 ; OPT-LABEL: @phi_v7i16(
929 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
931 ; OPT-NEXT: [[X:%.*]] = insertelement <7 x i16> [[IN:%.*]], i16 3, i32 3
932 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = shufflevector <7 x i16> [[X]], <7 x i16> poison, <2 x i32> <i32 0, i32 1>
933 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = shufflevector <7 x i16> [[X]], <7 x i16> poison, <2 x i32> <i32 2, i32 3>
934 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = shufflevector <7 x i16> [[X]], <7 x i16> poison, <2 x i32> <i32 4, i32 5>
935 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = extractelement <7 x i16> [[X]], i64 6
936 ; OPT-NEXT: br label [[FINALLY:%.*]]
938 ; OPT-NEXT: [[Y:%.*]] = insertelement <7 x i16> [[IN]], i16 9, i32 6
939 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = shufflevector <7 x i16> [[Y]], <7 x i16> poison, <2 x i32> <i32 0, i32 1>
940 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = shufflevector <7 x i16> [[Y]], <7 x i16> poison, <2 x i32> <i32 2, i32 3>
941 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = shufflevector <7 x i16> [[Y]], <7 x i16> poison, <2 x i32> <i32 4, i32 5>
942 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = extractelement <7 x i16> [[Y]], i64 6
943 ; OPT-NEXT: br label [[FINALLY]]
945 ; OPT-NEXT: [[TMP0:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
946 ; OPT-NEXT: [[TMP1:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE2]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE3]], [[ELSE]] ]
947 ; OPT-NEXT: [[TMP2:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
948 ; OPT-NEXT: [[TMP3:%.*]] = phi i16 [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
949 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = call <7 x i16> @llvm.vector.insert.v7i16.v2i16(<7 x i16> poison, <2 x i16> [[TMP0]], i64 0)
950 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = call <7 x i16> @llvm.vector.insert.v7i16.v2i16(<7 x i16> [[LARGEPHI_INSERTSLICE0]], <2 x i16> [[TMP1]], i64 2)
951 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = call <7 x i16> @llvm.vector.insert.v7i16.v2i16(<7 x i16> [[LARGEPHI_INSERTSLICE1]], <2 x i16> [[TMP2]], i64 4)
952 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <7 x i16> [[LARGEPHI_INSERTSLICE2]], i16 [[TMP3]], i64 6
953 ; OPT-NEXT: store <7 x i16> [[LARGEPHI_INSERTSLICE3]], ptr [[OUT:%.*]], align 1
956 ; NOOPT-LABEL: @phi_v7i16(
958 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
960 ; NOOPT-NEXT: [[X:%.*]] = insertelement <7 x i16> [[IN:%.*]], i16 3, i32 3
961 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
963 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <7 x i16> [[IN]], i16 9, i32 6
964 ; NOOPT-NEXT: br label [[FINALLY]]
966 ; NOOPT-NEXT: [[VAL:%.*]] = phi <7 x i16> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ]
967 ; NOOPT-NEXT: store <7 x i16> [[VAL]], ptr [[OUT:%.*]], align 1
968 ; NOOPT-NEXT: ret void
971 br i1 %cond, label %then, label %else
973 %x = insertelement <7 x i16> %in, i16 3, i32 3
976 %y = insertelement <7 x i16> %in, i16 9, i32 6
979 %val = phi <7 x i16> [%x, %then], [%y, %else]
980 store <7 x i16> %val, ptr %out, align 1
985 define amdgpu_kernel void @phi_v7i16_switch(<7 x i16> %in, ptr %out, i8 %cond) {
986 ; OPT-LABEL: @phi_v7i16_switch(
988 ; OPT-NEXT: [[X:%.*]] = insertelement <7 x i16> [[IN:%.*]], i16 3, i32 3
989 ; OPT-NEXT: switch i8 [[COND:%.*]], label [[ELSE:%.*]] [
990 ; OPT-NEXT: i8 0, label [[THEN_1:%.*]]
991 ; OPT-NEXT: i8 3, label [[THEN_2:%.*]]
994 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = shufflevector <7 x i16> [[X]], <7 x i16> poison, <2 x i32> <i32 0, i32 1>
995 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = shufflevector <7 x i16> [[X]], <7 x i16> poison, <2 x i32> <i32 2, i32 3>
996 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = shufflevector <7 x i16> [[X]], <7 x i16> poison, <2 x i32> <i32 4, i32 5>
997 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = extractelement <7 x i16> [[X]], i64 6
998 ; OPT-NEXT: br label [[FINALLY:%.*]]
1000 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = shufflevector <7 x i16> [[X]], <7 x i16> poison, <2 x i32> <i32 0, i32 1>
1001 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = shufflevector <7 x i16> [[X]], <7 x i16> poison, <2 x i32> <i32 2, i32 3>
1002 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = shufflevector <7 x i16> [[X]], <7 x i16> poison, <2 x i32> <i32 4, i32 5>
1003 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = extractelement <7 x i16> [[X]], i64 6
1004 ; OPT-NEXT: br label [[FINALLY]]
1006 ; OPT-NEXT: [[Y:%.*]] = insertelement <7 x i16> [[IN]], i16 9, i32 6
1007 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE2:%.*]] = shufflevector <7 x i16> [[Y]], <7 x i16> poison, <2 x i32> <i32 0, i32 1>
1008 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE5:%.*]] = shufflevector <7 x i16> [[Y]], <7 x i16> poison, <2 x i32> <i32 2, i32 3>
1009 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE8:%.*]] = shufflevector <7 x i16> [[Y]], <7 x i16> poison, <2 x i32> <i32 4, i32 5>
1010 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE11:%.*]] = extractelement <7 x i16> [[Y]], i64 6
1011 ; OPT-NEXT: br label [[FINALLY]]
1013 ; OPT-NEXT: [[TMP0:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN_1]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[THEN_2]] ], [ [[LARGEPHI_EXTRACTSLICE2]], [[ELSE]] ]
1014 ; OPT-NEXT: [[TMP1:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE3]], [[THEN_1]] ], [ [[LARGEPHI_EXTRACTSLICE4]], [[THEN_2]] ], [ [[LARGEPHI_EXTRACTSLICE5]], [[ELSE]] ]
1015 ; OPT-NEXT: [[TMP2:%.*]] = phi <2 x i16> [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN_1]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[THEN_2]] ], [ [[LARGEPHI_EXTRACTSLICE8]], [[ELSE]] ]
1016 ; OPT-NEXT: [[TMP3:%.*]] = phi i16 [ [[LARGEPHI_EXTRACTSLICE9]], [[THEN_1]] ], [ [[LARGEPHI_EXTRACTSLICE10]], [[THEN_2]] ], [ [[LARGEPHI_EXTRACTSLICE11]], [[ELSE]] ]
1017 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = call <7 x i16> @llvm.vector.insert.v7i16.v2i16(<7 x i16> poison, <2 x i16> [[TMP0]], i64 0)
1018 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = call <7 x i16> @llvm.vector.insert.v7i16.v2i16(<7 x i16> [[LARGEPHI_INSERTSLICE0]], <2 x i16> [[TMP1]], i64 2)
1019 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = call <7 x i16> @llvm.vector.insert.v7i16.v2i16(<7 x i16> [[LARGEPHI_INSERTSLICE1]], <2 x i16> [[TMP2]], i64 4)
1020 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <7 x i16> [[LARGEPHI_INSERTSLICE2]], i16 [[TMP3]], i64 6
1021 ; OPT-NEXT: store <7 x i16> [[LARGEPHI_INSERTSLICE3]], ptr [[OUT:%.*]], align 1
1022 ; OPT-NEXT: ret void
1024 ; NOOPT-LABEL: @phi_v7i16_switch(
1025 ; NOOPT-NEXT: entry:
1026 ; NOOPT-NEXT: [[X:%.*]] = insertelement <7 x i16> [[IN:%.*]], i16 3, i32 3
1027 ; NOOPT-NEXT: switch i8 [[COND:%.*]], label [[ELSE:%.*]] [
1028 ; NOOPT-NEXT: i8 0, label [[THEN_1:%.*]]
1029 ; NOOPT-NEXT: i8 3, label [[THEN_2:%.*]]
1032 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
1034 ; NOOPT-NEXT: br label [[FINALLY]]
1036 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <7 x i16> [[IN]], i16 9, i32 6
1037 ; NOOPT-NEXT: br label [[FINALLY]]
1039 ; NOOPT-NEXT: [[VAL:%.*]] = phi <7 x i16> [ [[X]], [[THEN_1]] ], [ [[X]], [[THEN_2]] ], [ [[Y]], [[ELSE]] ]
1040 ; NOOPT-NEXT: store <7 x i16> [[VAL]], ptr [[OUT:%.*]], align 1
1041 ; NOOPT-NEXT: ret void
1044 %x = insertelement <7 x i16> %in, i16 3, i32 3
1045 switch i8 %cond, label %else [
1054 %y = insertelement <7 x i16> %in, i16 9, i32 6
1057 %val = phi <7 x i16> [%x, %then.1], [%x, %then.2], [%y, %else]
1058 store <7 x i16> %val, ptr %out, align 1
1062 ; Checks that we can deal with PHIs that have the same basic block/incoming value
1063 ; pair appear more than once in the incoming blocks.
1064 ; It's not illegal IR. However, if the pass lazily transforms all incoming values
1065 ; without checking for duplicates, it could create a PHI with the same basic block
1066 ; appearing multiple times, but with different incoming values, which is then illegal
1069 ; PHI node has multiple entries for the same basic block with different incoming values!
1070 define amdgpu_kernel void @multi_inc_same_bb(<5 x double> %in, ptr %out, i1 %cond) {
1071 ; OPT-LABEL: @multi_inc_same_bb(
1073 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
1075 ; OPT-NEXT: [[X:%.*]] = insertelement <5 x double> [[IN:%.*]], double 3.140000e+00, i32 3
1076 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = extractelement <5 x double> [[X]], i64 0
1077 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = extractelement <5 x double> [[X]], i64 1
1078 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = extractelement <5 x double> [[X]], i64 2
1079 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = extractelement <5 x double> [[X]], i64 3
1080 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE12:%.*]] = extractelement <5 x double> [[X]], i64 4
1081 ; OPT-NEXT: br label [[FINALLY:%.*]]
1083 ; OPT-NEXT: [[Y:%.*]] = insertelement <5 x double> [[IN]], double 9.140000e+00, i32 2
1084 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = extractelement <5 x double> [[Y]], i64 0
1085 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = extractelement <5 x double> [[Y]], i64 1
1086 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = extractelement <5 x double> [[Y]], i64 2
1087 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = extractelement <5 x double> [[Y]], i64 3
1088 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE13:%.*]] = extractelement <5 x double> [[Y]], i64 4
1089 ; OPT-NEXT: br i1 [[COND]], label [[FINALLY]], label [[FINALLY]]
1091 ; OPT-NEXT: [[TMP0:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
1092 ; OPT-NEXT: [[TMP1:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE3]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE4]], [[ELSE]] ], [ [[LARGEPHI_EXTRACTSLICE4]], [[ELSE]] ]
1093 ; OPT-NEXT: [[TMP2:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
1094 ; OPT-NEXT: [[TMP3:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE9]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE10]], [[ELSE]] ], [ [[LARGEPHI_EXTRACTSLICE10]], [[ELSE]] ]
1095 ; OPT-NEXT: [[TMP4:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE12]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ]
1096 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = insertelement <5 x double> poison, double [[TMP0]], i64 0
1097 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE0]], double [[TMP1]], i64 1
1098 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE1]], double [[TMP2]], i64 2
1099 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE2]], double [[TMP3]], i64 3
1100 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE3]], double [[TMP4]], i64 4
1101 ; OPT-NEXT: store <5 x double> [[LARGEPHI_INSERTSLICE4]], ptr [[OUT:%.*]], align 1
1102 ; OPT-NEXT: ret void
1104 ; NOOPT-LABEL: @multi_inc_same_bb(
1105 ; NOOPT-NEXT: entry:
1106 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
1108 ; NOOPT-NEXT: [[X:%.*]] = insertelement <5 x double> [[IN:%.*]], double 3.140000e+00, i32 3
1109 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
1111 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <5 x double> [[IN]], double 9.140000e+00, i32 2
1112 ; NOOPT-NEXT: br i1 [[COND]], label [[FINALLY]], label [[FINALLY]]
1114 ; NOOPT-NEXT: [[VAL:%.*]] = phi <5 x double> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ], [ [[Y]], [[ELSE]] ]
1115 ; NOOPT-NEXT: store <5 x double> [[VAL]], ptr [[OUT:%.*]], align 1
1116 ; NOOPT-NEXT: ret void
1119 br i1 %cond, label %then, label %else
1121 %x = insertelement <5 x double> %in, double 3.14, i32 3
1124 %y = insertelement <5 x double> %in, double 9.14, i32 2
1125 br i1 %cond, label %finally, label %finally
1127 %val = phi <5 x double> [%x, %then], [%y, %else], [%y, %else]
1128 store <5 x double> %val, ptr %out, align 1
1132 ; Checks that we can ndeal with blocks that just have a PHI + terminator.
1133 define amdgpu_kernel void @minimal_block_with_only_phi(<5 x double> %in, ptr %out, i1 %cond) {
1134 ; OPT-LABEL: @minimal_block_with_only_phi(
1136 ; OPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
1138 ; OPT-NEXT: [[X:%.*]] = insertelement <5 x double> [[IN:%.*]], double 3.140000e+00, i32 3
1139 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0:%.*]] = extractelement <5 x double> [[X]], i64 0
1140 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3:%.*]] = extractelement <5 x double> [[X]], i64 1
1141 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6:%.*]] = extractelement <5 x double> [[X]], i64 2
1142 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9:%.*]] = extractelement <5 x double> [[X]], i64 3
1143 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE12:%.*]] = extractelement <5 x double> [[X]], i64 4
1144 ; OPT-NEXT: br label [[FINALLY:%.*]]
1146 ; OPT-NEXT: [[Y:%.*]] = insertelement <5 x double> [[IN]], double 9.140000e+00, i32 2
1147 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1:%.*]] = extractelement <5 x double> [[Y]], i64 0
1148 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4:%.*]] = extractelement <5 x double> [[Y]], i64 1
1149 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7:%.*]] = extractelement <5 x double> [[Y]], i64 2
1150 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10:%.*]] = extractelement <5 x double> [[Y]], i64 3
1151 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE13:%.*]] = extractelement <5 x double> [[Y]], i64 4
1152 ; OPT-NEXT: br i1 [[COND]], label [[FINALLY]], label [[FINALLY]]
1154 ; OPT-NEXT: [[TMP0:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE0]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ], [ [[LARGEPHI_EXTRACTSLICE1]], [[ELSE]] ]
1155 ; OPT-NEXT: [[TMP1:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE3]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE4]], [[ELSE]] ], [ [[LARGEPHI_EXTRACTSLICE4]], [[ELSE]] ]
1156 ; OPT-NEXT: [[TMP2:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE6]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ], [ [[LARGEPHI_EXTRACTSLICE7]], [[ELSE]] ]
1157 ; OPT-NEXT: [[TMP3:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE9]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE10]], [[ELSE]] ], [ [[LARGEPHI_EXTRACTSLICE10]], [[ELSE]] ]
1158 ; OPT-NEXT: [[TMP4:%.*]] = phi double [ [[LARGEPHI_EXTRACTSLICE12]], [[THEN]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ], [ [[LARGEPHI_EXTRACTSLICE13]], [[ELSE]] ]
1159 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = insertelement <5 x double> poison, double [[TMP0]], i64 0
1160 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE0]], double [[TMP1]], i64 1
1161 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE1]], double [[TMP2]], i64 2
1162 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE2]], double [[TMP3]], i64 3
1163 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE4:%.*]] = insertelement <5 x double> [[LARGEPHI_INSERTSLICE3]], double [[TMP4]], i64 4
1164 ; OPT-NEXT: br label [[REALLYFINALLY:%.*]]
1165 ; OPT: reallyfinally:
1166 ; OPT-NEXT: store <5 x double> [[LARGEPHI_INSERTSLICE4]], ptr [[OUT:%.*]], align 1
1167 ; OPT-NEXT: ret void
1169 ; NOOPT-LABEL: @minimal_block_with_only_phi(
1170 ; NOOPT-NEXT: entry:
1171 ; NOOPT-NEXT: br i1 [[COND:%.*]], label [[THEN:%.*]], label [[ELSE:%.*]]
1173 ; NOOPT-NEXT: [[X:%.*]] = insertelement <5 x double> [[IN:%.*]], double 3.140000e+00, i32 3
1174 ; NOOPT-NEXT: br label [[FINALLY:%.*]]
1176 ; NOOPT-NEXT: [[Y:%.*]] = insertelement <5 x double> [[IN]], double 9.140000e+00, i32 2
1177 ; NOOPT-NEXT: br i1 [[COND]], label [[FINALLY]], label [[FINALLY]]
1179 ; NOOPT-NEXT: [[VAL:%.*]] = phi <5 x double> [ [[X]], [[THEN]] ], [ [[Y]], [[ELSE]] ], [ [[Y]], [[ELSE]] ]
1180 ; NOOPT-NEXT: br label [[REALLYFINALLY:%.*]]
1181 ; NOOPT: reallyfinally:
1182 ; NOOPT-NEXT: store <5 x double> [[VAL]], ptr [[OUT:%.*]], align 1
1183 ; NOOPT-NEXT: ret void
1186 br i1 %cond, label %then, label %else
1188 %x = insertelement <5 x double> %in, double 3.14, i32 3
1191 %y = insertelement <5 x double> %in, double 9.14, i32 2
1192 br i1 %cond, label %finally, label %finally
1194 %val = phi <5 x double> [%x, %then], [%y, %else], [%y, %else]
1195 br label %reallyfinally
1197 store <5 x double> %val, ptr %out, align 1
1201 define amdgpu_kernel void @pr85718(i1 %Bool, ptr %Ptr, <4 x float> %Vec1, <4 x float> %Vec2) {
1202 ; OPT-LABEL: @pr85718(
1204 ; OPT-NEXT: [[I:%.*]] = insertelement <4 x float> [[VEC1:%.*]], float 4.200000e+01, i1 true
1205 ; OPT-NEXT: br label [[BB1:%.*]]
1207 ; OPT-NEXT: [[TMP0:%.*]] = phi float [ [[LARGEPHI_EXTRACTSLICE0:%.*]], [[BB2:%.*]] ], [ [[LARGEPHI_EXTRACTSLICE1:%.*]], [[BB1]] ], [ 0.000000e+00, [[BB0:%.*]] ]
1208 ; OPT-NEXT: [[TMP1:%.*]] = phi float [ [[LARGEPHI_EXTRACTSLICE3:%.*]], [[BB2]] ], [ [[LARGEPHI_EXTRACTSLICE4:%.*]], [[BB1]] ], [ 0.000000e+00, [[BB0]] ]
1209 ; OPT-NEXT: [[TMP2:%.*]] = phi float [ [[LARGEPHI_EXTRACTSLICE6:%.*]], [[BB2]] ], [ [[LARGEPHI_EXTRACTSLICE7:%.*]], [[BB1]] ], [ 0.000000e+00, [[BB0]] ]
1210 ; OPT-NEXT: [[TMP3:%.*]] = phi float [ [[LARGEPHI_EXTRACTSLICE9:%.*]], [[BB2]] ], [ [[LARGEPHI_EXTRACTSLICE10:%.*]], [[BB1]] ], [ 0.000000e+00, [[BB0]] ]
1211 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE0:%.*]] = insertelement <4 x float> poison, float [[TMP0]], i64 0
1212 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE1:%.*]] = insertelement <4 x float> [[LARGEPHI_INSERTSLICE0]], float [[TMP1]], i64 1
1213 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE2:%.*]] = insertelement <4 x float> [[LARGEPHI_INSERTSLICE1]], float [[TMP2]], i64 2
1214 ; OPT-NEXT: [[LARGEPHI_INSERTSLICE3:%.*]] = insertelement <4 x float> [[LARGEPHI_INSERTSLICE2]], float [[TMP3]], i64 3
1215 ; OPT-NEXT: store <4 x float> [[LARGEPHI_INSERTSLICE3]], ptr [[PTR:%.*]], align 128
1216 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE1]] = extractelement <4 x float> [[VEC2:%.*]], i64 0
1217 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE4]] = extractelement <4 x float> [[VEC2]], i64 1
1218 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE7]] = extractelement <4 x float> [[VEC2]], i64 2
1219 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE10]] = extractelement <4 x float> [[VEC2]], i64 3
1220 ; OPT-NEXT: br i1 [[BOOL:%.*]], label [[BB1]], label [[BB2]]
1222 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE0]] = extractelement <4 x float> [[I]], i64 0
1223 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE3]] = extractelement <4 x float> [[I]], i64 1
1224 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE6]] = extractelement <4 x float> [[I]], i64 2
1225 ; OPT-NEXT: [[LARGEPHI_EXTRACTSLICE9]] = extractelement <4 x float> [[I]], i64 3
1226 ; OPT-NEXT: br label [[BB1]]
1228 ; NOOPT-LABEL: @pr85718(
1230 ; NOOPT-NEXT: [[I:%.*]] = insertelement <4 x float> [[VEC1:%.*]], float 4.200000e+01, i1 true
1231 ; NOOPT-NEXT: br label [[BB1:%.*]]
1233 ; NOOPT-NEXT: [[PHI:%.*]] = phi <4 x float> [ [[I]], [[BB2:%.*]] ], [ [[VEC2:%.*]], [[BB1]] ], [ zeroinitializer, [[BB0:%.*]] ]
1234 ; NOOPT-NEXT: store <4 x float> [[PHI]], ptr [[PTR:%.*]], align 128
1235 ; NOOPT-NEXT: br i1 [[BOOL:%.*]], label [[BB1]], label [[BB2]]
1237 ; NOOPT-NEXT: br label [[BB1]]
1240 %I = insertelement <4 x float> %Vec1, float 4.200000e+01, i1 true
1243 BB1: ; preds = %BB0, %BB1, %BB2
1244 %PHI = phi <4 x float> [ %I, %BB2 ], [ %Vec2, %BB1 ], [ zeroinitializer, %BB0 ]
1245 store <4 x float> %PHI, ptr %Ptr, align 128
1246 br i1 %Bool, label %BB1, label %BB2