1 ; RUN: opt -passes='print<access-info>' -store-to-load-forwarding-conflict-detection=false -disable-output < %s 2>&1 | FileCheck %s
3 ; This test checks that we prove the strided accesses to be independent before
4 ; concluding that there is a forward dependence.
11 ; int independent_interleaved(struct pair *p, int z, int n) {
13 ; for (int i = 0; i < n; i++) {
22 ; CHECK-NOT: store i32 %z, ptr %p_i.y, align 8 ->
23 ; CHECK-NOT: %0 = load i32, ptr %p_i.x, align 8
25 %pair = type { i32, i32 }
26 define i32 @independent_interleaved(ptr %p, i64 %n, i32 %z) {
31 %i = phi i64 [ %i.next, %for.body ], [ 0, %entry ]
32 %s = phi i32 [ %1, %for.body ], [ 0, %entry ]
33 %p_i.x = getelementptr inbounds %pair, ptr %p, i64 %i, i32 0
34 %p_i.y = getelementptr inbounds %pair, ptr %p, i64 %i, i32 1
35 store i32 %z, ptr %p_i.y, align 8
36 %0 = load i32, ptr %p_i.x, align 8
37 %1 = add nsw i32 %0, %s
38 %i.next = add nuw nsw i64 %i, 1
39 %cond = icmp slt i64 %i.next, %n
40 br i1 %cond, label %for.body, label %for.end
43 %2 = phi i32 [ %1, %for.body ]