1 ; RUN: opt %loadNPMPolly '-passes=print<polly-detect>' -disable-output < %s 2>&1 | FileCheck %s
3 ; Verify polly skips this function
5 ; CHECK-NOT: Valid Region for Scop
7 ; void polly_skip_me(int *A, int N) {
8 ; for (int i = 0; i < N; i++)
9 ; A[i] = A[i] * A[i] + A[i];
12 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
14 define void @polly_skip_me(ptr %A, i32 %N) #0 {
18 entry.split: ; preds = %entry
19 %cmp1 = icmp sgt i32 %N, 0
20 br i1 %cmp1, label %for.body.preheader, label %for.end
22 for.body.preheader: ; preds = %entry.split
25 for.body: ; preds = %for.body.preheader, %for.body
26 %i.02 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]
27 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %i.02
28 %tmp = load i32, ptr %arrayidx, align 4
29 %mul = mul nsw i32 %tmp, %tmp
30 %add = add nsw i32 %mul, %tmp
31 %arrayidx3 = getelementptr inbounds i32, ptr %A, i32 %i.02
32 store i32 %add, ptr %arrayidx3, align 4
33 %inc = add nsw i32 %i.02, 1
34 %cmp = icmp slt i32 %inc, %N
35 br i1 %cmp, label %for.body, label %for.end.loopexit
37 for.end.loopexit: ; preds = %for.body
40 for.end: ; preds = %for.end.loopexit, %entry.split
44 attributes #0 = { "polly.skip.fn" }