brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 789942a Raw
45 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<detect>' -polly-print-detect -disable-output < %s 2>&1 | FileCheck %s2;3; Verify polly skips this function4;5; CHECK-NOT: Valid Region for Scop6;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];10;    }11;12target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"13 14define void @polly_skip_me(ptr %A, i32 %N) #0 {15entry:16  br label %entry.split17 18entry.split:                                      ; preds = %entry19  %cmp1 = icmp sgt i32 %N, 020  br i1 %cmp1, label %for.body.preheader, label %for.end21 22for.body.preheader:                               ; preds = %entry.split23  br label %for.body24 25for.body:                                         ; preds = %for.body.preheader, %for.body26  %i.02 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]27  %arrayidx = getelementptr inbounds i32, ptr %A, i32 %i.0228  %tmp = load i32, ptr %arrayidx, align 429  %mul = mul nsw i32 %tmp, %tmp30  %add = add nsw i32 %mul, %tmp31  %arrayidx3 = getelementptr inbounds i32, ptr %A, i32 %i.0232  store i32 %add, ptr %arrayidx3, align 433  %inc = add nsw i32 %i.02, 134  %cmp = icmp slt i32 %inc, %N35  br i1 %cmp, label %for.body, label %for.end.loopexit36 37for.end.loopexit:                                 ; preds = %for.body38  br label %for.end39 40for.end:                                          ; preds = %for.end.loopexit, %entry.split41  ret void42}43 44attributes #0 = { "polly.skip.fn" }45