74 lines · plain
1; RUN: opt %loadNPMPolly -polly-process-unprofitable=false '-passes=polly-custom<detect>' -polly-print-detect -disable-output < %s 2>&1 | FileCheck %s2; RUN: opt %loadNPMPolly -polly-process-unprofitable=true '-passes=polly-custom<detect>' -polly-print-detect -disable-output < %s 2>&1 | FileCheck %s3 4; CHECK: Valid Region for Scop:5 6; void foo(float *A, float *B, long N) {7; if (N > 100)8; for (long i = 0; i < 100; i++)9; A[i] += i;10; else11; for (long i = 0; i < 100; i++)12; B[i] += i;13; }14;15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"16 17define void @foo(ptr %A, ptr %B, i64 %N) {18entry:19 br label %bb20 21bb:22 %tmp = icmp sgt i64 %N, 10023 br i1 %tmp, label %bb2, label %bb1224 25bb2: ; preds = %bb26 br label %bb327 28bb3: ; preds = %bb9, %bb229 %i.0 = phi i64 [ 0, %bb2 ], [ %tmp10, %bb9 ]30 %exitcond = icmp ne i64 %i.0, 10031 br i1 %exitcond, label %bb4, label %bb1132 33bb4: ; preds = %bb334 %tmp5 = sitofp i64 %i.0 to float35 %tmp6 = getelementptr inbounds float, ptr %A, i64 %i.036 %tmp7 = load float, ptr %tmp6, align 437 %tmp8 = fadd float %tmp7, %tmp538 store float %tmp8, ptr %tmp6, align 439 br label %bb940 41bb9: ; preds = %bb442 %tmp10 = add nsw i64 %i.0, 143 br label %bb344 45bb11: ; preds = %bb346 br label %bb2247 48bb12: ; preds = %bb49 br label %bb1350 51bb13: ; preds = %bb19, %bb1252 %i1.0 = phi i64 [ 0, %bb12 ], [ %tmp20, %bb19 ]53 %exitcond1 = icmp ne i64 %i1.0, 10054 br i1 %exitcond1, label %bb14, label %bb2155 56bb14: ; preds = %bb1357 %tmp15 = sitofp i64 %i1.0 to float58 %tmp16 = getelementptr inbounds float, ptr %B, i64 %i1.059 %tmp17 = load float, ptr %tmp16, align 460 %tmp18 = fadd float %tmp17, %tmp1561 store float %tmp18, ptr %tmp16, align 462 br label %bb1963 64bb19: ; preds = %bb1465 %tmp20 = add nsw i64 %i1.0, 166 br label %bb1367 68bb21: ; preds = %bb1369 br label %bb2270 71bb22: ; preds = %bb21, %bb1172 ret void73}74