Update Polly tests to handle explicitly typed gep changes in LLVM
[polly-mirror.git] / test / Isl / Ast / dependence_distance_multiple_constant.ll
blob32f9d4c9e2c41fea680302443fba6a6e360037fd
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++) {
6 ;            A[i + 7] = A[i] + 1;
7 ;            B[i + 5] = B[i] + 1;
8 ;          }
9 ;        }
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) {
14 entry:
15   br label %for.cond
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
35   br label %for.inc
37 for.inc:                                          ; preds = %for.body
38   %inc = add nsw i32 %i.0, 1
39   br label %for.cond
41 for.end:                                          ; preds = %for.cond
42   ret void