1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; CHECK: Assumed Context:
4 ; CHECK-NEXT: [N] -> { : }
5 ; CHECK-NEXT: Invalid Context:
6 ; CHECK-NEXT: [N] -> { : false }
9 ; CHECK-NEXT: Stmt_if_then
10 ; CHECK-NEXT: Domain :=
11 ; CHECK-NEXT: [N] -> { Stmt_if_then[i0] : (1 + i0) mod 2 = 0 and 0 < i0 < N }
12 ; CHECK-NEXT: Schedule :=
13 ; CHECK-NEXT: [N] -> { Stmt_if_then[i0] -> [i0] };
14 ; CHECK-NEXT: ReadAccess := [Reduction Type: +] [Scalar: 0]
15 ; CHECK-NEXT: [N] -> { Stmt_if_then[i0] -> MemRef_A[i0] };
16 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: +] [Scalar: 0]
17 ; CHECK-NEXT: [N] -> { Stmt_if_then[i0] -> MemRef_A[i0] };
20 ; void f(int *A, int N) {
21 ; for (int i = 0; i < N; i++) {
27 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
29 define void @f(ptr %A, i32 %N) {
31 %tmp = sext i32 %N to i64
34 for.cond: ; preds = %for.inc, %entry
35 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
36 %cmp = icmp slt i64 %indvars.iv, %tmp
37 br i1 %cmp, label %for.body, label %for.end
39 for.body: ; preds = %for.cond
40 %tmp1 = trunc i64 %indvars.iv to i32
41 %and = and i32 %tmp1, 1
42 %tobool = icmp eq i32 %and, 0
43 br i1 %tobool, label %if.end, label %if.then
45 if.then: ; preds = %for.body
46 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
47 %tmp2 = load i32, ptr %arrayidx, align 4
48 %inc = add nsw i32 %tmp2, 1
49 store i32 %inc, ptr %arrayidx, align 4
52 if.end: ; preds = %for.body, %if.then
55 for.inc: ; preds = %if.end
56 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
59 for.end: ; preds = %for.cond