@@ -263,6 +263,11 @@ exit:
263
263
ret void
264
264
}
265
265
266
+ ; The type-size of the source is different from that of the sink,
267
+ ; and the dependence distance is 10.
268
+ ; TODO: Relax the HasSameSize check; the strided accesses are
269
+ ; independent, as determined by both the source size and the sink size.
270
+ ; This test should report no dependencies.
266
271
define void @different_type_sizes_strided_accesses_independent (ptr %dst ) {
267
272
; CHECK-LABEL: 'different_type_sizes_strided_accesses_independent'
268
273
; CHECK-NEXT: loop:
@@ -299,6 +304,10 @@ exit:
299
304
ret void
300
305
}
301
306
307
+ ; Variant of the above, where the source size forbids strided access
308
+ ; independence.
309
+ ; TODO: Relax the HasSameSize check; this test should report a backward
310
+ ; loop-carried dependence.
302
311
define void @different_type_sizes_strided_accesses_dependent (ptr %dst ) {
303
312
; CHECK-LABEL: 'different_type_sizes_strided_accesses_dependent'
304
313
; CHECK-NEXT: loop:
@@ -335,6 +344,11 @@ exit:
335
344
ret void
336
345
}
337
346
347
+ ; Source type-size differs from that of the sink, but when
348
+ ; determining backward dependence, only the source size
349
+ ; is relevant.
350
+ ; TODO: Relax the HasSameSize check; this test should report
351
+ ; BackwardVectorizable.
338
352
define void @different_type_sizes_source_size_backwardvectorizible (ptr %dst ) {
339
353
; CHECK-LABEL: 'different_type_sizes_source_size_backwardvectorizible'
340
354
; CHECK-NEXT: loop:
@@ -371,6 +385,9 @@ exit:
371
385
ret void
372
386
}
373
387
388
+ ; Source type-size differs from that of the sink, and when
389
+ ; determining forward dependence, the source size can
390
+ ; prevent forwarding.
374
391
define void @different_type_sizes_forward (ptr %dst ) {
375
392
; CHECK-LABEL: 'different_type_sizes_forward'
376
393
; CHECK-NEXT: loop:
@@ -406,6 +423,10 @@ exit:
406
423
ret void
407
424
}
408
425
426
+ ; Same as the above, but here, the store size should not prevent
427
+ ; ld->st forwarding.
428
+ ; TODO: Relax the HasSameSize check; this test should report a
429
+ ; forward dependence.
409
430
define void @different_type_sizes_store_size_cannot_prevent_forwarding (ptr %A , ptr noalias %B ) {
410
431
; CHECK-LABEL: 'different_type_sizes_store_size_cannot_prevent_forwarding'
411
432
; CHECK-NEXT: loop:
@@ -443,6 +464,8 @@ exit:
443
464
ret void
444
465
}
445
466
467
+ ; Same as the above, but here, the load size prevents
468
+ ; ld->st forwarding.
446
469
define void @different_type_sizes_load_size_prevents_forwarding (ptr %A , ptr noalias %B ) {
447
470
; CHECK-LABEL: 'different_type_sizes_load_size_prevents_forwarding'
448
471
; CHECK-NEXT: loop:
0 commit comments