1 ; RUN: opt %loadPolly -polly-stmt-granularity=scalar-indep -polly-print-instructions -polly-print-scops -disable-output < %s | FileCheck %s -match-full-lines
3 ; This case should be split into two statements because {X[0], Y[0]}
4 ; and {A[0], B[0]} do not intersect.
7 ; for (int j = 0; j < n; j += 1) {
17 define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B, ptr noalias nonnull %X, ptr noalias nonnull %Y) {
22 %j = phi i32 [0, %entry], [%j.inc, %inc]
23 %j.cmp = icmp slt i32 %j, %n
24 br i1 %j.cmp, label %body, label %exit
27 %valX = load double, ptr %X
28 store double %valX, ptr %Y
29 %valA = load double, ptr %A
30 %valB = load double, ptr %B
31 store double %valA, ptr %A
32 store double %valB, ptr %A
36 %j.inc = add nuw nsw i32 %j, 1
48 ; CHECK-NEXT: Stmt_body
49 ; CHECK-NEXT: Domain :=
50 ; CHECK-NEXT: [n] -> { Stmt_body[i0] : 0 <= i0 < n };
51 ; CHECK-NEXT: Schedule :=
52 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> [i0, 0] };
53 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
54 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_X[0] };
55 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
56 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_Y[0] };
57 ; CHECK-NEXT: Instructions {
58 ; CHECK-NEXT: %valX = load double, ptr %X, align 8
59 ; CHECK-NEXT: store double %valX, ptr %Y, align 8
61 ; CHECK-NEXT: Stmt_body_b
62 ; CHECK-NEXT: Domain :=
63 ; CHECK-NEXT: [n] -> { Stmt_body_b[i0] : 0 <= i0 < n };
64 ; CHECK-NEXT: Schedule :=
65 ; CHECK-NEXT: [n] -> { Stmt_body_b[i0] -> [i0, 1] };
66 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
67 ; CHECK-NEXT: [n] -> { Stmt_body_b[i0] -> MemRef_A[0] };
68 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
69 ; CHECK-NEXT: [n] -> { Stmt_body_b[i0] -> MemRef_B[0] };
70 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
71 ; CHECK-NEXT: [n] -> { Stmt_body_b[i0] -> MemRef_A[0] };
72 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
73 ; CHECK-NEXT: [n] -> { Stmt_body_b[i0] -> MemRef_A[0] };
74 ; CHECK-NEXT: Instructions {
75 ; CHECK-NEXT: %valA = load double, ptr %A, align 8
76 ; CHECK-NEXT: %valB = load double, ptr %B, align 8
77 ; CHECK-NEXT: store double %valA, ptr %A, align 8
78 ; CHECK-NEXT: store double %valB, ptr %A, align 8