1 ; RUN: opt %loadNPMPolly -polly-process-unprofitable=false '-passes=print<polly-detect>' -disable-output < %s 2>&1 | FileCheck %s
2 ; RUN: opt %loadNPMPolly -polly-process-unprofitable=true '-passes=print<polly-detect>' -disable-output < %s 2>&1 | FileCheck %s
4 ; CHECK: Valid Region for Scop:
6 ; void foo(float *A, float *B, long N) {
8 ; for (long i = 0; i < 100; i++)
11 ; for (long i = 0; i < 100; i++)
15 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 define void @foo(ptr %A, ptr %B, i64 %N) {
22 %tmp = icmp sgt i64 %N, 100
23 br i1 %tmp, label %bb2, label %bb12
28 bb3: ; preds = %bb9, %bb2
29 %i.0 = phi i64 [ 0, %bb2 ], [ %tmp10, %bb9 ]
30 %exitcond = icmp ne i64 %i.0, 100
31 br i1 %exitcond, label %bb4, label %bb11
34 %tmp5 = sitofp i64 %i.0 to float
35 %tmp6 = getelementptr inbounds float, ptr %A, i64 %i.0
36 %tmp7 = load float, ptr %tmp6, align 4
37 %tmp8 = fadd float %tmp7, %tmp5
38 store float %tmp8, ptr %tmp6, align 4
42 %tmp10 = add nsw i64 %i.0, 1
51 bb13: ; preds = %bb19, %bb12
52 %i1.0 = phi i64 [ 0, %bb12 ], [ %tmp20, %bb19 ]
53 %exitcond1 = icmp ne i64 %i1.0, 100
54 br i1 %exitcond1, label %bb14, label %bb21
57 %tmp15 = sitofp i64 %i1.0 to float
58 %tmp16 = getelementptr inbounds float, ptr %B, i64 %i1.0
59 %tmp17 = load float, ptr %tmp16, align 4
60 %tmp18 = fadd float %tmp17, %tmp15
61 store float %tmp18, ptr %tmp16, align 4
65 %tmp20 = add nsw i64 %i1.0, 1
71 bb22: ; preds = %bb21, %bb11