1; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -polly-print-instructions < %s | FileCheck %s 2; 3; CHECK: Statements { 4; CHECK-NEXT: Stmt_Stmt 5; CHECK-NEXT: Domain := 6; CHECK-NEXT: { Stmt_Stmt[i0, i1] : 0 <= i0 <= 1023 and 0 <= i1 <= 512 }; 7; CHECK-NEXT: Schedule := 8; CHECK-NEXT: { Stmt_Stmt[i0, i1] -> [i0, i1, 0] }; 9; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] 10; CHECK-NEXT: { Stmt_Stmt[i0, i1] -> MemRef_A[i0] }; 11; CHECK-NEXT: Instructions { 12; CHECK-NEXT: store i32 %i.0, i32* %arrayidx, align 4, !polly_split_after !0 13; CHECK-NEXT: } 14; CHECK-NEXT: Stmt_Stmt_b 15; CHECK-NEXT: Domain := 16; CHECK-NEXT: { Stmt_Stmt_b[i0, i1] : 0 <= i0 <= 1023 and 0 <= i1 <= 512 }; 17; CHECK-NEXT: Schedule := 18; CHECK-NEXT: { Stmt_Stmt_b[i0, i1] -> [i0, i1, 1] }; 19; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0] 20; CHECK-NEXT: { Stmt_Stmt_b[i0, i1] -> MemRef_B[i0] }; 21; CHECK-NEXT: Instructions { 22; CHECK-NEXT: store i32 %i.0, i32* %arrayidx2, align 4 23; CHECK-NEXT: %cond = icmp slt i32 %j, 512 24; CHECK-NEXT: } 25; CHECK-NEXT: } 26; 27; Function Attrs: noinline nounwind uwtable 28define void @func(i32* %A, i32* %B, double* %C) #0 { 29entry: 30 br label %for.cond 31 32for.cond: ; preds = %for.inc, %entry 33 %i.0 = phi i32 [ 0, %entry ], [ %add, %for.inc ] 34 %cmp = icmp slt i32 %i.0, 1024 35 br i1 %cmp, label %for.body, label %for.end 36 37for.body: ; preds = %for.cond 38 br label %Stmt 39 40Stmt: 41 %j = phi i32 [ 0, %for.body ], [ %inc, %Stmt ] 42 %idxprom = sext i32 %i.0 to i64 43 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %idxprom 44 store i32 %i.0, i32* %arrayidx, align 4, !polly_split_after !0 45 %idxprom1 = sext i32 %i.0 to i64 46 %arrayidx2 = getelementptr inbounds i32, i32* %B, i64 %idxprom1 47 store i32 %i.0, i32* %arrayidx2, align 4 48 %inc = add nsw i32 %j, 1 49 %cond = icmp slt i32 %j, 512 50 br i1 %cond, label %Stmt, label %for.inc 51 52for.inc: ; preds = %Stmt 53 %add = add nsw i32 %i.0, 1 54 br label %for.cond 55 56for.end: ; preds = %for.cond 57 ret void 58} 59 60!0 = !{!"polly_split_after"} 61