1 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-loops '-passes=print<polly-detect>' -disable-output < %s 2>&1 | FileCheck %s
2 ; RUN: opt %loadNPMPolly -polly-allow-nonaffine-loops -polly-process-unprofitable=false '-passes=print<polly-detect>' -disable-output < %s 2>&1 | FileCheck %s --check-prefix=PROFIT
5 ; for (int i = 0; i < 1024; i++) {
13 ; CHECK: Valid Region for Scop: bb1 => bb12
14 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
16 define void @f(ptr %A) {
20 bb1: ; preds = %bb11, %bb
21 %indvars.iv = phi i64 [ %indvars.iv.next, %bb11 ], [ 0, %bb ]
22 %exitcond = icmp ne i64 %indvars.iv, 1024
23 br i1 %exitcond, label %bb2, label %bb12
28 bb3: ; preds = %bb6, %bb2
29 %tmp = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
30 %tmp4 = load i32, ptr %tmp, align 4
31 %tmp5 = icmp eq i32 %tmp4, 0
32 br i1 %tmp5, label %bb10, label %bb6
35 %tmp7 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
36 %tmp8 = load i32, ptr %tmp7, align 4
37 %tmp9 = add nsw i32 %tmp8, -1
38 store i32 %tmp9, ptr %tmp7, align 4
45 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1