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