You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[LAA] Pre-commit tests exercising different types (#151091)
Pre-commit tests exercising different types of source/sink in
depend_diff_types.ll, in preparation to weaken the HasSameSize check in
LoopAccessAnalysis.
Co-authored-by: Igor Kirillov <[email protected]>
; CHECK-NEXT: Report: unsafe dependent memory operations in loop. Use #pragma clang loop distribute(enable) to allow loop distribution to attempt to isolate the offending operations into a separate loop
284
+
; CHECK-NEXT: Unknown data dependence.
285
+
; CHECK-NEXT: Dependences:
286
+
; CHECK-NEXT: Unknown:
287
+
; CHECK-NEXT: store i16 0, ptr %gep.iv, align 2 ->
288
+
; CHECK-NEXT: store i32 1, ptr %gep.4.iv, align 4
289
+
; CHECK-EMPTY:
290
+
; CHECK-NEXT: Run-time memory checks:
291
+
; CHECK-NEXT: Grouped accesses:
292
+
; CHECK-EMPTY:
293
+
; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop.
294
+
; CHECK-NEXT: SCEV assumptions:
295
+
; CHECK-EMPTY:
296
+
; CHECK-NEXT: Expressions re-written:
297
+
;
298
+
entry:
299
+
%gep.4 = getelementptrnuwi8, ptr%dst, i644
300
+
brlabel%loop
301
+
302
+
loop:
303
+
%iv = phii64 [ 0, %entry ], [ %iv.next, %loop ]
304
+
%iv.2 = addnuwnswi64%iv, 2
305
+
%gep.iv = getelementptri8, ptr%dst, i64%iv.2
306
+
storei160, ptr%gep.iv
307
+
%gep.4.iv = getelementptri8, ptr%gep.4, i64%iv.2
308
+
storei321, ptr%gep.4.iv
309
+
%iv.next = addnuwnswi64%iv, 8
310
+
%ec = icmpeqi64%iv.next, 64
311
+
bri1%ec, label%exit, label%loop
312
+
313
+
exit:
314
+
retvoid
315
+
}
316
+
317
+
318
+
; i16 i64
319
+
; [ . 0 0 . 1 1 1 1] [ 1 x x 1 1 1 1 1 ]
320
+
; ^~~^ gep i8 = 1
321
+
; ^~~^ iv.1 = iv + 1
322
+
; ^ ~~ ^ dependence distance = 3
323
+
; ^ ~~~~~~~~~~~~~~~~ ^ 8
324
+
; ^ ~~~~~~~~~~~~~~~~ ^ 8
325
+
; ^ ~~~~~~~~~~~~~~~~ ^ iv.next = iv + 8
326
+
;
327
+
; TODO: Relax the HasSameSize check; this test should report a backward
; CHECK-NEXT: Report: unsafe dependent memory operations in loop. Use #pragma clang loop distribute(enable) to allow loop distribution to attempt to isolate the offending operations into a separate loop
333
+
; CHECK-NEXT: Unknown data dependence.
334
+
; CHECK-NEXT: Dependences:
335
+
; CHECK-NEXT: Unknown:
336
+
; CHECK-NEXT: store i16 0, ptr %gep.iv, align 2 ->
337
+
; CHECK-NEXT: store i64 1, ptr %gep.3.iv, align 4
338
+
; CHECK-EMPTY:
339
+
; CHECK-NEXT: Run-time memory checks:
340
+
; CHECK-NEXT: Grouped accesses:
341
+
; CHECK-EMPTY:
342
+
; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop.
343
+
; CHECK-NEXT: SCEV assumptions:
344
+
; CHECK-EMPTY:
345
+
; CHECK-NEXT: Expressions re-written:
346
+
;
347
+
entry:
348
+
%gep.3 = getelementptrnuwi8, ptr%dst, i643
349
+
brlabel%loop
350
+
351
+
loop:
352
+
%iv = phii64 [ 0, %entry ], [ %iv.next, %loop ]
353
+
%iv.1 = addnuwnswi64%iv, 1
354
+
%gep.iv = getelementptri8, ptr%dst, i64%iv.1
355
+
storei160, ptr%gep.iv
356
+
%gep.3.iv = getelementptri8, ptr%gep.3, i64%iv.1
357
+
storei641, ptr%gep.3.iv
358
+
%iv.next = addnuwnswi64%iv, 8
359
+
%ec = icmpeqi64%iv.next, 64
360
+
bri1%ec, label%exit, label%loop
361
+
362
+
exit:
363
+
retvoid
364
+
}
365
+
366
+
; Variant of the above, where the store size exceeds the dependence
; CHECK-NEXT: Report: unsafe dependent memory operations in loop. Use #pragma clang loop distribute(enable) to allow loop distribution to attempt to isolate the offending operations into a separate loop
372
+
; CHECK-NEXT: Unsafe indirect dependence.
373
+
; CHECK-NEXT: Dependences:
374
+
; CHECK-NEXT: IndirectUnsafe:
375
+
; CHECK-NEXT: store i16 0, ptr %gep.iv, align 2 ->
376
+
; CHECK-NEXT: store i128 1, ptr %gep.10.iv, align 4
377
+
; CHECK-EMPTY:
378
+
; CHECK-NEXT: Run-time memory checks:
379
+
; CHECK-NEXT: Grouped accesses:
380
+
; CHECK-EMPTY:
381
+
; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop.
382
+
; CHECK-NEXT: SCEV assumptions:
383
+
; CHECK-EMPTY:
384
+
; CHECK-NEXT: Expressions re-written:
385
+
;
386
+
entry:
387
+
%gep.10 = getelementptrnuwi8, ptr%dst, i6410
388
+
brlabel%loop
389
+
390
+
loop:
391
+
%iv = phii64 [ 0, %entry ], [ %iv.next, %loop ]
392
+
%gep.iv = getelementptri8, ptr%dst, i64%iv
393
+
storei160, ptr%gep.iv
394
+
%gep.10.iv = getelementptri8, ptr%gep.10, i64%iv
395
+
storei1281, ptr%gep.10.iv
396
+
%iv.next = addi64%iv, 8
397
+
%ec = icmpeqi64%iv.next, 64
398
+
bri1%ec, label%exit, label%loop
399
+
400
+
exit:
401
+
retvoid
402
+
}
403
+
404
+
405
+
; Source type-size differs from that of the sink, but when
406
+
; determining backward dependence, only the source size
407
+
; is relevant.
408
+
; TODO: Relax the HasSameSize check; this test should report
; CHECK-NEXT: Report: unsafe dependent memory operations in loop. Use #pragma clang loop distribute(enable) to allow loop distribution to attempt to isolate the offending operations into a separate loop
414
+
; CHECK-NEXT: Unknown data dependence.
415
+
; CHECK-NEXT: Dependences:
416
+
; CHECK-NEXT: Unknown:
417
+
; CHECK-NEXT: store i16 0, ptr %gep.iv, align 2 ->
418
+
; CHECK-NEXT: store i32 1, ptr %gep.10.iv, align 4
419
+
; CHECK-EMPTY:
420
+
; CHECK-NEXT: Run-time memory checks:
421
+
; CHECK-NEXT: Grouped accesses:
422
+
; CHECK-EMPTY:
423
+
; CHECK-NEXT: Non vectorizable stores to invariant address were not found in loop.
424
+
; CHECK-NEXT: SCEV assumptions:
425
+
; CHECK-EMPTY:
426
+
; CHECK-NEXT: Expressions re-written:
427
+
;
428
+
entry:
429
+
%gep.10 = getelementptrnuwi8, ptr%dst, i6410
430
+
brlabel%loop
431
+
432
+
loop:
433
+
%iv = phii64 [ 0, %entry ], [ %iv.next, %loop ]
434
+
%gep.iv = getelementptri8, ptr%dst, i64%iv
435
+
storei160, ptr%gep.iv
436
+
%gep.10.iv = getelementptri8, ptr%gep.10, i64%iv
437
+
storei321, ptr%gep.10.iv
438
+
%iv.next = addi64%iv, 8
439
+
%ec = icmpeqi64%iv.next, 64
440
+
bri1%ec, label%exit, label%loop
441
+
442
+
exit:
443
+
retvoid
444
+
}
445
+
446
+
; Source type-size differs from that of the sink, and when
447
+
; determining forward dependence, the source size can
; CHECK-NEXT: Report: unsafe dependent memory operations in loop. Use #pragma clang loop distribute(enable) to allow loop distribution to attempt to isolate the offending operations into a separate loop
492
+
; CHECK-NEXT: Forward loop carried data dependence that prevents store-to-load forwarding.
; CHECK-NEXT: Report: unsafe dependent memory operations in loop. Use #pragma clang loop distribute(enable) to allow loop distribution to attempt to isolate the offending operations into a separate loop
531
+
; CHECK-NEXT: Forward loop carried data dependence that prevents store-to-load forwarding.
0 commit comments