1 ; RUN: opt %loadPolly \
2 ; RUN: -polly-detect -polly-allow-nonaffine-loops -analyze \
3 ; RUN: < %s | FileCheck %s
4 ; RUN: opt %loadPolly -polly-process-unprofitable=false \
5 ; RUN: -polly-detect -polly-allow-nonaffine-loops -analyze \
6 ; RUN: < %s | FileCheck %s --check-prefix=PROFIT
9 ; for (int i = 0; i < 1024; i++) {
17 ; CHECK: Valid Region for Scop: bb1 => bb12
18 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
20 define void @f(i32* %A) {
24 bb1: ; preds = %bb11, %bb
25 %indvars.iv = phi i64 [ %indvars.iv.next, %bb11 ], [ 0, %bb ]
26 %exitcond = icmp ne i64 %indvars.iv, 1024
27 br i1 %exitcond, label %bb2, label %bb12
32 bb3: ; preds = %bb6, %bb2
33 %tmp = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
34 %tmp4 = load i32, i32* %tmp, align 4
35 %tmp5 = icmp eq i32 %tmp4, 0
36 br i1 %tmp5, label %bb10, label %bb6
39 %tmp7 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
40 %tmp8 = load i32, i32* %tmp7, align 4
41 %tmp9 = add nsw i32 %tmp8, -1
42 store i32 %tmp9, i32* %tmp7, align 4
49 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1