1; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s 2; 3; CHECK: Assumed Context: 4; CHECK-NEXT: [N] -> { : } 5; CHECK: Invalid Context: 6; CHECK-NEXT: [N] -> { : N >= 102 } 7; 8; void g(void); 9; void f(int *A, int N) { 10; for (int i = 0; i < N; i++) { 11; if (i > 100) 12; g(); 13; A[i]++; 14; } 15; } 16; 17target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 18 19define void @f(i32* %A, i32 %N) { 20entry: 21 %tmp = sext i32 %N to i64 22 br label %for.cond 23 24for.cond: ; preds = %for.inc, %entry 25 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] 26 %cmp = icmp slt i64 %indvars.iv, %tmp 27 br i1 %cmp, label %for.body, label %for.end 28 29for.body: ; preds = %for.cond 30 %cmp1 = icmp sgt i64 %indvars.iv, 100 31 br i1 %cmp1, label %if.then, label %if.end 32 33if.then: ; preds = %for.body 34 call void @g() #2 35 br label %if.end 36 37if.end: ; preds = %if.then, %for.body 38 %arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv 39 %tmp1 = load i32, i32* %arrayidx, align 4 40 %inc = add nsw i32 %tmp1, 1 41 store i32 %inc, i32* %arrayidx, align 4 42 br label %for.inc 43 44for.inc: ; preds = %if.end 45 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 46 br label %for.cond 47 48for.end: ; preds = %for.cond 49 ret void 50} 51 52declare void @g() 53