1 ; RUN: opt %loadPolly -polly-stmt-granularity=store -polly-print-instructions -polly-print-scops -disable-output < %s | FileCheck %s
3 ; void func(int *A, int *B){
4 ; for (int i = 0; i < 1024; i+=1) {
12 ; CHECK-NEXT: Stmt_Stmt
13 ; CHECK-NEXT: Domain :=
14 ; CHECK-NEXT: { Stmt_Stmt[i0] : 0 <= i0 <= 1023 };
15 ; CHECK-NEXT: Schedule :=
16 ; CHECK-NEXT: { Stmt_Stmt[i0] -> [i0, 0] };
17 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
18 ; CHECK-NEXT: { Stmt_Stmt[i0] -> MemRef_A[i0] };
19 ; CHECK-NEXT: Instructions {
20 ; CHECK-NEXT: store i32 %i.0, ptr %arrayidx, align 4
22 ; CHECK-NEXT: Stmt_Stmt_b
23 ; CHECK-NEXT: Domain :=
24 ; CHECK-NEXT: { Stmt_Stmt_b[i0] : 0 <= i0 <= 1023 };
25 ; CHECK-NEXT: Schedule :=
26 ; CHECK-NEXT: { Stmt_Stmt_b[i0] -> [i0, 1] };
27 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
28 ; CHECK-NEXT: { Stmt_Stmt_b[i0] -> MemRef_B[i0] };
29 ; CHECK-NEXT: Instructions {
30 ; CHECK-NEXT: store i32 %i.0, ptr %arrayidx2, align 4
34 ; Function Attrs: noinline nounwind uwtable
35 define void @func(ptr %A, ptr %B) #0 {
39 for.cond: ; preds = %for.inc, %entry
40 %i.0 = phi i32 [ 0, %entry ], [ %add, %for.inc ]
41 %cmp = icmp slt i32 %i.0, 1024
42 br i1 %cmp, label %for.body, label %for.end
44 for.body: ; preds = %for.cond
47 Stmt: ; preds = %for.body
48 %idxprom = sext i32 %i.0 to i64
49 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %idxprom
50 store i32 %i.0, ptr %arrayidx, align 4
51 %idxprom1 = sext i32 %i.0 to i64
52 %arrayidx2 = getelementptr inbounds i32, ptr %B, i64 %idxprom1
53 store i32 %i.0, ptr %arrayidx2, align 4
56 for.inc: ; preds = %Stmt
57 %add = add nsw i32 %i.0, 1
60 for.end: ; preds = %for.cond