1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; void jd(int *A, int c) {
4 ; for (int i = 0; i < 1024; i++) {
13 ; CHECK-LABEL: Stmt_if_else
15 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
16 ; CHECK: [c] -> { Stmt_if_else[i0] -> MemRef_phi__phi[] };
18 ; CHECK-LABEL: Stmt_if_then
20 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
21 ; CHECK: [c] -> { Stmt_if_then[i0] -> MemRef_phi__phi[] };
23 ; CHECK-LABEL: Stmt_if_end
25 ; CHECK: ReadAccess := [Reduction Type: NONE] [Scalar: 1]
26 ; CHECK: [c] -> { Stmt_if_end[i0] -> MemRef_phi__phi[] };
28 ; CHECK: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
29 ; CHECK: [c] -> { Stmt_if_end[i0] -> MemRef_A[i0] };
33 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
35 define void @jd(ptr %A, i32 %c) {
39 for.cond: ; preds = %for.inc, %entry
40 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
41 %exitcond = icmp ne i64 %indvars.iv, 1024
42 br i1 %exitcond, label %for.body, label %for.end
44 for.body: ; preds = %for.cond
45 %tobool = icmp eq i32 %c, 0
46 br i1 %tobool, label %if.else, label %if.then
48 if.then: ; preds = %for.body
51 if.else: ; preds = %for.body
54 if.end: ; preds = %if.else, %if.then
55 %phi = phi i32 [ 1, %if.then], [ 2, %if.else ]
56 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
57 store i32 %phi, ptr %arrayidx, align 4
60 for.inc: ; preds = %if.end
61 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
64 for.end: ; preds = %for.cond