1 ; RUN: opt %loadPolly -polly-detect -analyze < %s | FileCheck %s
3 ; CHECK: Valid Region for Scop:
5 ; void jd(int *A, int *B) {
6 ; for (int i = 0; i < 1024; i++)
7 ; A[i] = B[0] + B[1023];
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 define void @jd(i32* %A, i32* %B) {
16 for.cond: ; preds = %for.inc, %entry
17 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
18 %exitcond = icmp ne i64 %indvars.iv, 1024
19 br i1 %exitcond, label %for.body, label %for.end
21 for.body: ; preds = %for.cond
22 %tmp = load i32, i32* %B, align 4
23 %arrayidx1 = getelementptr inbounds i32, i32* %B, i64 1023
24 %tmp1 = load i32, i32* %arrayidx1, align 4
25 %add = add nsw i32 %tmp, %tmp1
26 %arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
27 store i32 %add, i32* %arrayidx2, align 4
30 for.inc: ; preds = %for.body
31 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
34 for.end: ; preds = %for.cond