1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; void f(int *A, unsigned N) {
4 ; for (unsigned i = 0; i < N / 2; i++)
8 ; CHECK: Assumed Context:
9 ; CHECK-NEXT: [N] -> { : }
10 ; CHECK-NEXT: Invalid Context:
11 ; CHECK-NEXT: [N] -> { : N < 0 }
14 ; CHECK-NEXT: [N] -> { Stmt_for_body[i0] : i0 >= 0 and 2i0 <= -2 + N };
16 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
18 define void @f(ptr %A, i32 %N) {
23 for.cond: ; preds = %for.inc, %entry
24 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
25 %lftr.wideiv = trunc i64 %indvars.iv to i32
26 %exitcond = icmp ne i32 %lftr.wideiv, %tmp
27 br i1 %exitcond, label %for.body, label %for.end
29 for.body: ; preds = %for.cond
30 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
31 %tmp1 = load i32, ptr %arrayidx, align 4
32 %inc = add nsw i32 %tmp1, 1
33 store i32 %inc, ptr %arrayidx, align 4
36 for.inc: ; preds = %for.body
37 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
40 for.end: ; preds = %for.cond