@@ -138,12 +138,12 @@ define i32* @test6_2() #0 {
138
138
define internal i8* @f1 (i8* readnone %0 ) local_unnamed_addr #0 {
139
139
; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
140
140
; IS__CGSCC____-LABEL: define {{[^@]+}}@f1
141
- ; IS__CGSCC____-SAME: (i8* noalias nofree noundef nonnull readnone returned align 8 dereferenceable(1) "no-capture-maybe-returned" [[TMP0:%.*]] ) local_unnamed_addr #[[ATTR0]] {
142
- ; IS__CGSCC____-NEXT: br label [[TMP3 :%.*]]
143
- ; IS__CGSCC____: 2 :
141
+ ; IS__CGSCC____-SAME: () local_unnamed_addr #[[ATTR0]] {
142
+ ; IS__CGSCC____-NEXT: br label [[TMP2 :%.*]]
143
+ ; IS__CGSCC____: 1 :
144
144
; IS__CGSCC____-NEXT: unreachable
145
- ; IS__CGSCC____: 3 :
146
- ; IS__CGSCC____-NEXT: ret i8* [[TMP0]]
145
+ ; IS__CGSCC____: 2 :
146
+ ; IS__CGSCC____-NEXT: ret i8* @a1
147
147
;
148
148
%2 = icmp eq i8* %0 , null
149
149
br i1 %2 , label %3 , label %5
@@ -163,32 +163,24 @@ define internal i8* @f2(i8* readnone %0) local_unnamed_addr #0 {
163
163
; IS__CGSCC_OPM: Function Attrs: noinline nounwind uwtable
164
164
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f2
165
165
; IS__CGSCC_OPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2:[0-9]+]] {
166
- ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
167
- ; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
166
+ ; IS__CGSCC_OPM-NEXT: unreachable
167
+ ; IS__CGSCC_OPM: 2:
168
+ ; IS__CGSCC_OPM-NEXT: unreachable
168
169
; IS__CGSCC_OPM: 3:
169
- ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* noalias noundef nonnull readnone align 4294967296 dereferenceable(4294967295) [[TMP0]])
170
- ; IS__CGSCC_OPM-NEXT: br label [[TMP7:%.*]]
171
- ; IS__CGSCC_OPM: 5:
172
- ; IS__CGSCC_OPM-NEXT: [[TMP6:%.*]] = tail call i8* @f3(i8* nonnull @a2)
173
- ; IS__CGSCC_OPM-NEXT: br label [[TMP7]]
174
- ; IS__CGSCC_OPM: 7:
175
- ; IS__CGSCC_OPM-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
176
- ; IS__CGSCC_OPM-NEXT: ret i8* [[TMP8]]
170
+ ; IS__CGSCC_OPM-NEXT: unreachable
171
+ ; IS__CGSCC_OPM: 4:
172
+ ; IS__CGSCC_OPM-NEXT: unreachable
177
173
;
178
174
; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable
179
175
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2
180
176
; IS__CGSCC_NPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
181
- ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
182
- ; IS__CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP5:%.*]], label [[TMP3:%.*]]
177
+ ; IS__CGSCC_NPM-NEXT: unreachable
178
+ ; IS__CGSCC_NPM: 2:
179
+ ; IS__CGSCC_NPM-NEXT: unreachable
183
180
; IS__CGSCC_NPM: 3:
184
- ; IS__CGSCC_NPM-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* noalias noundef nonnull readnone align 4294967296 dereferenceable(4294967295) [[TMP0]])
185
- ; IS__CGSCC_NPM-NEXT: br label [[TMP7:%.*]]
186
- ; IS__CGSCC_NPM: 5:
187
- ; IS__CGSCC_NPM-NEXT: [[TMP6:%.*]] = tail call i8* @f3()
188
- ; IS__CGSCC_NPM-NEXT: br label [[TMP7]]
189
- ; IS__CGSCC_NPM: 7:
190
- ; IS__CGSCC_NPM-NEXT: [[TMP8:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
191
- ; IS__CGSCC_NPM-NEXT: ret i8* [[TMP8]]
181
+ ; IS__CGSCC_NPM-NEXT: unreachable
182
+ ; IS__CGSCC_NPM: 4:
183
+ ; IS__CGSCC_NPM-NEXT: unreachable
192
184
;
193
185
%2 = icmp eq i8* %0 , null
194
186
br i1 %2 , label %5 , label %3
@@ -212,23 +204,20 @@ define internal i8* @f3(i8* readnone %0) local_unnamed_addr #0 {
212
204
; IS__CGSCC_OPM: Function Attrs: noinline nounwind uwtable
213
205
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f3
214
206
; IS__CGSCC_OPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] {
215
- ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
216
- ; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP5:%.*]]
207
+ ; IS__CGSCC_OPM-NEXT: unreachable
208
+ ; IS__CGSCC_OPM: 2:
209
+ ; IS__CGSCC_OPM-NEXT: unreachable
217
210
; IS__CGSCC_OPM: 3:
218
- ; IS__CGSCC_OPM-NEXT: [[TMP4:%.*]] = tail call i8* @f1(i8* noalias noundef nonnull readnone align 16 dereferenceable(1) @a2)
219
- ; IS__CGSCC_OPM-NEXT: br label [[TMP5]]
220
- ; IS__CGSCC_OPM: 5:
221
- ; IS__CGSCC_OPM-NEXT: [[TMP6:%.*]] = phi i8* [ [[TMP4]], [[TMP3]] ], [ @a1, [[TMP1:%.*]] ]
222
- ; IS__CGSCC_OPM-NEXT: ret i8* [[TMP6]]
211
+ ; IS__CGSCC_OPM-NEXT: unreachable
223
212
;
224
- ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
213
+ ; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable
225
214
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f3
226
- ; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR0]] {
227
- ; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]]
228
- ; IS__CGSCC_NPM: 1:
215
+ ; IS__CGSCC_NPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] {
229
216
; IS__CGSCC_NPM-NEXT: unreachable
230
217
; IS__CGSCC_NPM: 2:
231
- ; IS__CGSCC_NPM-NEXT: ret i8* @a1
218
+ ; IS__CGSCC_NPM-NEXT: unreachable
219
+ ; IS__CGSCC_NPM: 3:
220
+ ; IS__CGSCC_NPM-NEXT: unreachable
232
221
;
233
222
%2 = icmp eq i8* %0 , null
234
223
br i1 %2 , label %3 , label %5
@@ -253,12 +242,14 @@ define align 4 i8* @test7() #0 {
253
242
; IS__CGSCC_OPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
254
243
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test7
255
244
; IS__CGSCC_OPM-SAME: () #[[ATTR1]] {
256
- ; IS__CGSCC_OPM-NEXT: ret i8* @a1
245
+ ; IS__CGSCC_OPM-NEXT: [[C:%.*]] = tail call noundef nonnull align 8 dereferenceable(1) i8* @f1() #[[ATTR13:[0-9]+]]
246
+ ; IS__CGSCC_OPM-NEXT: ret i8* [[C]]
257
247
;
258
248
; IS__CGSCC_NPM: Function Attrs: nofree noinline nosync nounwind readnone willreturn uwtable
259
249
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test7
260
250
; IS__CGSCC_NPM-SAME: () #[[ATTR2:[0-9]+]] {
261
- ; IS__CGSCC_NPM-NEXT: ret i8* @a1
251
+ ; IS__CGSCC_NPM-NEXT: [[C:%.*]] = tail call noundef nonnull align 8 dereferenceable(1) i8* @f1() #[[ATTR13:[0-9]+]]
252
+ ; IS__CGSCC_NPM-NEXT: ret i8* [[C]]
262
253
;
263
254
%c = tail call i8* @f1 (i8* align 8 dereferenceable (1 ) @a1 )
264
255
ret i8* %c
@@ -267,23 +258,14 @@ define align 4 i8* @test7() #0 {
267
258
; TEST 7b
268
259
; Function Attrs: nounwind readnone ssp uwtable
269
260
define internal i8* @f1b (i8* readnone %0 ) local_unnamed_addr #0 {
270
- ; IS__CGSCC_OPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
271
- ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f1b
272
- ; IS__CGSCC_OPM-SAME: (i8* noalias nocapture nofree nonnull readnone align 8 dereferenceable(1) [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0]] {
273
- ; IS__CGSCC_OPM-NEXT: br label [[TMP3:%.*]]
274
- ; IS__CGSCC_OPM: 2:
275
- ; IS__CGSCC_OPM-NEXT: unreachable
276
- ; IS__CGSCC_OPM: 3:
277
- ; IS__CGSCC_OPM-NEXT: ret i8* undef
278
- ;
279
- ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
280
- ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f1b
281
- ; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR0]] {
282
- ; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]]
283
- ; IS__CGSCC_NPM: 1:
284
- ; IS__CGSCC_NPM-NEXT: unreachable
285
- ; IS__CGSCC_NPM: 2:
286
- ; IS__CGSCC_NPM-NEXT: ret i8* undef
261
+ ; IS__CGSCC____: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
262
+ ; IS__CGSCC____-LABEL: define {{[^@]+}}@f1b
263
+ ; IS__CGSCC____-SAME: () local_unnamed_addr #[[ATTR0]] {
264
+ ; IS__CGSCC____-NEXT: br label [[TMP2:%.*]]
265
+ ; IS__CGSCC____: 1:
266
+ ; IS__CGSCC____-NEXT: unreachable
267
+ ; IS__CGSCC____: 2:
268
+ ; IS__CGSCC____-NEXT: ret i8* undef
287
269
;
288
270
%2 = icmp eq i8* %0 , null
289
271
br i1 %2 , label %3 , label %5
@@ -305,30 +287,24 @@ define internal i8* @f2b(i8* readnone %0) local_unnamed_addr #0 {
305
287
; IS__CGSCC_OPM: Function Attrs: noinline nounwind uwtable
306
288
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f2b
307
289
; IS__CGSCC_OPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] {
308
- ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
309
- ; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP4:%.*]], label [[TMP3:%.*]]
290
+ ; IS__CGSCC_OPM-NEXT: unreachable
291
+ ; IS__CGSCC_OPM: 2:
292
+ ; IS__CGSCC_OPM-NEXT: unreachable
310
293
; IS__CGSCC_OPM: 3:
311
- ; IS__CGSCC_OPM-NEXT: br label [[TMP6:%.*]]
294
+ ; IS__CGSCC_OPM-NEXT: unreachable
312
295
; IS__CGSCC_OPM: 4:
313
- ; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = tail call i8* @f3b(i8* nonnull @a2)
314
- ; IS__CGSCC_OPM-NEXT: br label [[TMP6]]
315
- ; IS__CGSCC_OPM: 6:
316
- ; IS__CGSCC_OPM-NEXT: [[TMP7:%.*]] = phi i8* [ undef, [[TMP3]] ], [ [[TMP5]], [[TMP4]] ]
317
- ; IS__CGSCC_OPM-NEXT: ret i8* [[TMP7]]
296
+ ; IS__CGSCC_OPM-NEXT: unreachable
318
297
;
319
298
; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable
320
299
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f2b
321
300
; IS__CGSCC_NPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] {
322
- ; IS__CGSCC_NPM-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
323
- ; IS__CGSCC_NPM-NEXT: br i1 [[TMP2]], label [[TMP4:%.*]], label [[TMP3:%.*]]
301
+ ; IS__CGSCC_NPM-NEXT: unreachable
302
+ ; IS__CGSCC_NPM: 2:
303
+ ; IS__CGSCC_NPM-NEXT: unreachable
324
304
; IS__CGSCC_NPM: 3:
325
- ; IS__CGSCC_NPM-NEXT: br label [[TMP6:%.*]]
305
+ ; IS__CGSCC_NPM-NEXT: unreachable
326
306
; IS__CGSCC_NPM: 4:
327
- ; IS__CGSCC_NPM-NEXT: [[TMP5:%.*]] = tail call i8* @f3b()
328
- ; IS__CGSCC_NPM-NEXT: br label [[TMP6]]
329
- ; IS__CGSCC_NPM: 6:
330
- ; IS__CGSCC_NPM-NEXT: [[TMP7:%.*]] = phi i8* [ undef, [[TMP3]] ], [ [[TMP5]], [[TMP4]] ]
331
- ; IS__CGSCC_NPM-NEXT: ret i8* [[TMP7]]
307
+ ; IS__CGSCC_NPM-NEXT: unreachable
332
308
;
333
309
%2 = icmp eq i8* %0 , null
334
310
br i1 %2 , label %5 , label %3
@@ -353,22 +329,20 @@ define internal i8* @f3b(i8* readnone %0) local_unnamed_addr #0 {
353
329
; IS__CGSCC_OPM: Function Attrs: noinline nounwind uwtable
354
330
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f3b
355
331
; IS__CGSCC_OPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR2]] {
356
- ; IS__CGSCC_OPM-NEXT: [[TMP2:%.*]] = icmp eq i8* [[TMP0]], null
357
- ; IS__CGSCC_OPM-NEXT: br i1 [[TMP2]], label [[TMP3:%.*]], label [[TMP4:%.*]]
332
+ ; IS__CGSCC_OPM-NEXT: unreachable
333
+ ; IS__CGSCC_OPM: 2:
334
+ ; IS__CGSCC_OPM-NEXT: unreachable
358
335
; IS__CGSCC_OPM: 3:
359
- ; IS__CGSCC_OPM-NEXT: br label [[TMP4]]
360
- ; IS__CGSCC_OPM: 4:
361
- ; IS__CGSCC_OPM-NEXT: [[TMP5:%.*]] = phi i8* [ @a2, [[TMP3]] ], [ @a1, [[TMP1:%.*]] ]
362
- ; IS__CGSCC_OPM-NEXT: ret i8* [[TMP5]]
336
+ ; IS__CGSCC_OPM-NEXT: unreachable
363
337
;
364
- ; IS__CGSCC_NPM: Function Attrs: nofree noinline norecurse nosync nounwind readnone willreturn uwtable
338
+ ; IS__CGSCC_NPM: Function Attrs: noinline nounwind uwtable
365
339
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f3b
366
- ; IS__CGSCC_NPM-SAME: () local_unnamed_addr #[[ATTR0]] {
367
- ; IS__CGSCC_NPM-NEXT: br label [[TMP2:%.*]]
368
- ; IS__CGSCC_NPM: 1:
340
+ ; IS__CGSCC_NPM-SAME: (i8* readnone [[TMP0:%.*]]) local_unnamed_addr #[[ATTR1]] {
369
341
; IS__CGSCC_NPM-NEXT: unreachable
370
342
; IS__CGSCC_NPM: 2:
371
- ; IS__CGSCC_NPM-NEXT: ret i8* @a1
343
+ ; IS__CGSCC_NPM-NEXT: unreachable
344
+ ; IS__CGSCC_NPM: 3:
345
+ ; IS__CGSCC_NPM-NEXT: unreachable
372
346
;
373
347
%2 = icmp eq i8* %0 , null
374
348
br i1 %2 , label %3 , label %5
@@ -1042,7 +1016,7 @@ define i32 @musttail_caller_1(i32* %p) {
1042
1016
; IS__CGSCC____-NEXT: [[C:%.*]] = load i1, i1* @cnd, align 1
1043
1017
; IS__CGSCC____-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]
1044
1018
; IS__CGSCC____: mt:
1045
- ; IS__CGSCC____-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) #[[ATTR13 :[0-9]+]]
1019
+ ; IS__CGSCC____-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(i32* nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) #[[ATTR14 :[0-9]+]]
1046
1020
; IS__CGSCC____-NEXT: ret i32 [[V]]
1047
1021
; IS__CGSCC____: exit:
1048
1022
; IS__CGSCC____-NEXT: ret i32 0
@@ -1180,7 +1154,7 @@ define i8* @aligned_8_return_caller(i8* align(16) %a, i1 %c1, i1 %c2) {
1180
1154
; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
1181
1155
; IS__CGSCC____-LABEL: define {{[^@]+}}@aligned_8_return_caller
1182
1156
; IS__CGSCC____-SAME: (i8* nofree readnone align 16 [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR12:[0-9]+]] {
1183
- ; IS__CGSCC____-NEXT: [[R:%.*]] = call align 8 i8* @aligned_8_return(i8* noalias nofree readnone align 16 [[A]], i1 [[C1]], i1 [[C2]]) #[[ATTR14 :[0-9]+]]
1157
+ ; IS__CGSCC____-NEXT: [[R:%.*]] = call align 8 i8* @aligned_8_return(i8* noalias nofree readnone align 16 [[A]], i1 [[C1]], i1 [[C2]]) #[[ATTR13 :[0-9]+]]
1184
1158
; IS__CGSCC____-NEXT: ret i8* [[R]]
1185
1159
;
1186
1160
%r = call i8* @aligned_8_return (i8* %a , i1 %c1 , i1 %c2 )
@@ -1218,8 +1192,8 @@ attributes #2 = { null_pointer_is_valid }
1218
1192
; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind readnone willreturn }
1219
1193
; IS__CGSCC_OPM: attributes #[[ATTR11]] = { nofree nosync nounwind readonly willreturn }
1220
1194
; IS__CGSCC_OPM: attributes #[[ATTR12]] = { nofree nosync nounwind readnone willreturn }
1221
- ; IS__CGSCC_OPM: attributes #[[ATTR13]] = { readonly willreturn }
1222
- ; IS__CGSCC_OPM: attributes #[[ATTR14]] = { readnone willreturn }
1195
+ ; IS__CGSCC_OPM: attributes #[[ATTR13]] = { readnone willreturn }
1196
+ ; IS__CGSCC_OPM: attributes #[[ATTR14]] = { readonly willreturn }
1223
1197
;.
1224
1198
; IS__CGSCC_NPM: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone willreturn uwtable }
1225
1199
; IS__CGSCC_NPM: attributes #[[ATTR1]] = { noinline nounwind uwtable }
@@ -1234,6 +1208,6 @@ attributes #2 = { null_pointer_is_valid }
1234
1208
; IS__CGSCC_NPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind readnone willreturn }
1235
1209
; IS__CGSCC_NPM: attributes #[[ATTR11]] = { nofree nosync nounwind readonly willreturn }
1236
1210
; IS__CGSCC_NPM: attributes #[[ATTR12]] = { nofree nosync nounwind readnone willreturn }
1237
- ; IS__CGSCC_NPM: attributes #[[ATTR13]] = { readonly willreturn }
1238
- ; IS__CGSCC_NPM: attributes #[[ATTR14]] = { readnone willreturn }
1211
+ ; IS__CGSCC_NPM: attributes #[[ATTR13]] = { readnone willreturn }
1212
+ ; IS__CGSCC_NPM: attributes #[[ATTR14]] = { readonly willreturn }
1239
1213
;.
0 commit comments