1 ; RUN: opt %loadPolly -basic-aa -polly-print-import-jscop -disable-output < %s | FileCheck %s
3 ; Check that we allow the new access functions even though they access
4 ; different locations than the original ones (but the alignment is the
5 ; default, thus there is no problem).
7 ; CHECK-DAG: New access function '{ Stmt_for_body[i0] -> MemRef_B[0] }' detected in JSCOP file
8 ; CHECK-DAG: New access function '{ Stmt_for_body[i0] -> MemRef_A[i0] }' detected in JSCOP file
10 ; void simple_stride(int *restrict A, int *restrict B) {
11 ; for (int i = 0; i < 16; i++)
12 ; A[i * 2] = B[i * 2];
15 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 define void @simple_stride(ptr noalias %A, ptr noalias %B) {
21 for.cond: ; preds = %for.inc, %entry
22 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
23 %exitcond = icmp ne i64 %indvars.iv, 16
24 br i1 %exitcond, label %for.body, label %for.end
26 for.body: ; preds = %for.cond
27 %tmp = shl nsw i64 %indvars.iv, 1
28 %arrayidx = getelementptr inbounds i32, ptr %B, i64 %tmp
29 %tmp4 = load i32, ptr %arrayidx, align 4
30 %tmp5 = shl nsw i64 %indvars.iv, 1
31 %arrayidx3 = getelementptr inbounds i32, ptr %A, i64 %tmp5
32 store i32 %tmp4, ptr %arrayidx3, align 4
35 for.inc: ; preds = %for.body
36 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
39 for.end: ; preds = %for.cond