1 ; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s
3 ; void f(int *restrict A, int *restrict B, int N) {
4 ; CHECK: #pragma minimal dependence distance: 5
5 ; for (int i = 0; i < N; i++) {
11 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
13 define void @f(i32* noalias %A, i32* noalias %B, i32 %N) {
17 for.cond: ; preds = %for.inc, %entry
18 %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
19 %cmp = icmp slt i32 %i.0, %N
20 br i1 %cmp, label %for.body, label %for.end
22 for.body: ; preds = %for.cond
23 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %i.0
24 %tmp = load i32* %arrayidx, align 4
25 %add = add nsw i32 %tmp, 1
26 %add1 = add nsw i32 %i.0, 7
27 %arrayidx2 = getelementptr inbounds i32, i32* %A, i32 %add1
28 store i32 %add, i32* %arrayidx2, align 4
29 %arrayidx3 = getelementptr inbounds i32, i32* %B, i32 %i.0
30 %tmp1 = load i32* %arrayidx3, align 4
31 %add4 = add nsw i32 %tmp1, 1
32 %add5 = add nsw i32 %i.0, 5
33 %arrayidx6 = getelementptr inbounds i32, i32* %B, i32 %add5
34 store i32 %add4, i32* %arrayidx6, align 4
37 for.inc: ; preds = %for.body
38 %inc = add nsw i32 %i.0, 1
41 for.end: ; preds = %for.cond