1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; CHECK: Invariant Accesses: {
6 ; CHECK-NOT: Stmt_if_then
10 ; for (int i = 1; i < 10; i++) {
17 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19 define void @f(ptr %A) {
23 for.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
28 for.body: ; preds = %for.cond
29 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
30 %tmp = load i32, ptr %arrayidx, align 4
31 %inc = add nsw i32 %tmp, 1
32 store i32 %inc, ptr %arrayidx, align 4
33 br i1 false, label %if.then, label %if.end
35 if.then: ; preds = %for.body
36 %tmp1 = load i32, ptr %A, align 4
37 %arrayidx4 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
38 %tmp2 = load i32, ptr %arrayidx4, align 4
39 %add = add nsw i32 %tmp2, %tmp1
40 store i32 %add, ptr %arrayidx4, align 4
43 if.end: ; preds = %if.then, %for.body
46 for.inc: ; preds = %if.end
47 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
50 for.end: ; preds = %for.cond