1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
4 ; CHECK: [N, P] -> { Stmt_if_end[i0] : 0 <= i0 < N and (i0 > P or i0 < P) };
6 ; void f(int *A, int N, int P, int Q) {
7 ; for (int i = 0; i < N; i++) {
14 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
16 define void @f(ptr %A, i32 %N, i32 %P, i32 %Q) {
18 %tmp = sext i32 %N to i64
21 for.cond: ; preds = %for.inc, %entry
22 %indvars.iv = phi i64 [ %indvars.iv.next, %if.then ], [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
23 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
24 %cmp = icmp slt i64 %indvars.iv, %tmp
25 br i1 %cmp, label %for.body, label %for.end
27 for.body: ; preds = %for.cond
28 %tmp1 = trunc i64 %indvars.iv to i32
29 %cmp1 = icmp eq i32 %tmp1, %P
30 br i1 %cmp1, label %if.then, label %if.end
32 if.then: ; preds = %for.body
35 if.end: ; preds = %for.body
36 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
37 %tmp2 = load i32, ptr %arrayidx, align 4
38 %inc = add nsw i32 %tmp2, 1
39 store i32 %inc, ptr %arrayidx, align 4
42 for.inc: ; preds = %if.end, %if.then
45 for.end: ; preds = %for.cond