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 cannot be split into two statements because the order of
4 ; loads and store would be violated.
6 ; for (int j = 0; j < n; j += 1) {
14 define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B) {
19 %j = phi i32 [0, %entry], [%j.inc, %inc]
20 %j.cmp = icmp slt i32 %j, %n
21 br i1 %j.cmp, label %body, label %exit
24 %valA = load double, ptr %A
25 %valB = load double, ptr %B
26 store double %valA, ptr %A
27 store double %valB, ptr %A
31 %j.inc = add nuw nsw i32 %j, 1
43 ; CHECK-NEXT: Stmt_body
44 ; CHECK-NEXT: Domain :=
45 ; CHECK-NEXT: [n] -> { Stmt_body[i0] : 0 <= i0 < n };
46 ; CHECK-NEXT: Schedule :=
47 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> [i0] };
48 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
49 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
50 ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0]
51 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_B[0] };
52 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
53 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
54 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
55 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
56 ; CHECK-NEXT: Instructions {
57 ; CHECK-NEXT: %valA = load double, ptr %A, align 8
58 ; CHECK-NEXT: %valB = load double, ptr %B, align 8
59 ; CHECK-NEXT: store double %valA, ptr %A, align 8
60 ; CHECK-NEXT: store double %valB, ptr %A, align 8