1 ; RUN: opt %loadPolly -polly-process-unprofitable=false \
3 ; RUN: -polly-detect -analyze < %s | FileCheck %s
5 ; RUN: opt %loadPolly -polly-process-unprofitable=true \
7 ; RUN: -polly-detect -analyze < %s | FileCheck %s
9 ; CHECK: Valid Region for Scop:
11 ; void foo(float *A, float *B, long N) {
13 ; for (long i = 0; i < 100; i++)
16 ; for (long i = 0; i < 100; i++)
20 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
22 define void @foo(float* %A, float* %B, i64 %N) {
27 %tmp = icmp sgt i64 %N, 100
28 br i1 %tmp, label %bb2, label %bb12
33 bb3: ; preds = %bb9, %bb2
34 %i.0 = phi i64 [ 0, %bb2 ], [ %tmp10, %bb9 ]
35 %exitcond = icmp ne i64 %i.0, 100
36 br i1 %exitcond, label %bb4, label %bb11
39 %tmp5 = sitofp i64 %i.0 to float
40 %tmp6 = getelementptr inbounds float, float* %A, i64 %i.0
41 %tmp7 = load float, float* %tmp6, align 4
42 %tmp8 = fadd float %tmp7, %tmp5
43 store float %tmp8, float* %tmp6, align 4
47 %tmp10 = add nsw i64 %i.0, 1
56 bb13: ; preds = %bb19, %bb12
57 %i1.0 = phi i64 [ 0, %bb12 ], [ %tmp20, %bb19 ]
58 %exitcond1 = icmp ne i64 %i1.0, 100
59 br i1 %exitcond1, label %bb14, label %bb21
62 %tmp15 = sitofp i64 %i1.0 to float
63 %tmp16 = getelementptr inbounds float, float* %B, i64 %i1.0
64 %tmp17 = load float, float* %tmp16, align 4
65 %tmp18 = fadd float %tmp17, %tmp15
66 store float %tmp18, float* %tmp16, align 4
70 %tmp20 = add nsw i64 %i1.0, 1
76 bb22: ; preds = %bb21, %bb11