brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · c7972cc Raw
41 lines · plain
1; RUN: opt %loadNPMPolly -aa-pipeline=basic-aa -polly-allow-modref-calls '-passes=polly-custom<detect>' -polly-print-detect -disable-output < %s 2>&1 | FileCheck %s -check-prefix=MODREF2; RUN: opt %loadNPMPolly -aa-pipeline=basic-aa '-passes=polly-custom<detect>' -polly-print-detect -disable-output < %s 2>&1 | FileCheck %s3;4; CHECK-NOT: Valid Region for Scop: for.body => for.end5; MODREF: Valid Region for Scop: for.body => for.end6;7;    #pragma readonly8;    int func(int *A);9;10;    void jd(int *A) {11;      for (int i = 0; i < 1024; i++)12;        A[i + 2] = func(A);13;    }14;15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"16 17declare i32 @func(ptr %A) #118 19define void @jd(ptr %A) {20entry:21  br label %for.body22 23for.body:                                         ; preds = %entry, %for.inc24  %i = phi i64 [ 0, %entry ], [ %i.next, %for.inc ]25  %call = call i32 @func(ptr %A)26  %tmp = add nsw i64 %i, 227  %arrayidx = getelementptr inbounds i32, ptr %A, i64 %tmp28  store i32 %call, ptr %arrayidx, align 429  br label %for.inc30 31for.inc:                                          ; preds = %for.body32  %i.next = add nuw nsw i64 %i, 133  %exitcond = icmp ne i64 %i.next, 102434  br i1 %exitcond, label %for.body, label %for.end35 36for.end:                                          ; preds = %for.inc37  ret void38}39 40attributes #1 = { nounwind readonly }41