• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt %loadPolly -polly-detect -analyze < %s | FileCheck %s
2;
3; CHECK-NOT: Valid Region for Scop:
4;
5;    void foo(float *A, long n, long p) {
6;      for (long i = 0; i < 100; i++)
7;        A[n % p] += 1;
8;    }
9;
10target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
11
12define void @foo(float* %A, i64 %n, i64 %p) {
13bb:
14  br label %bb1
15
16bb1:                                              ; preds = %bb6, %bb
17  %i.0 = phi i64 [ 0, %bb ], [ %tmp7, %bb6 ]
18  %exitcond = icmp ne i64 %i.0, 100
19  br i1 %exitcond, label %bb2, label %bb8
20
21bb2:                                              ; preds = %bb1
22  %tmp = srem i64 %n, %p
23  %tmp3 = getelementptr inbounds float, float* %A, i64 %tmp
24  %tmp4 = load float, float* %tmp3, align 4
25  %tmp5 = fadd float %tmp4, 1.000000e+00
26  store float %tmp5, float* %tmp3, align 4
27  br label %bb6
28
29bb6:                                              ; preds = %bb2
30  %tmp7 = add nsw i64 %i.0, 1
31  br label %bb1
32
33bb8:                                              ; preds = %bb1
34  ret void
35}
36