Update Polly tests to handle explicitly typed gep changes in LLVM
[polly-mirror.git] / test / Isl / Ast / dependence_distance_varying.ll
bloba66ed9171c3c75366c889593996cf4ce9fa586b5
1 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s
3 ;         void f(int *A, int N) {
4 ; CHECK:    #pragma minimal dependence distance: ((N - 1) % 2) + 1
5 ;           for (int i = 0; i < N; i++)
6 ;             A[i] = A[N - i] + 1;
7 ;         }
9 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
11 define void @f(i32* %A, i32 %N) {
12 entry:
13   br label %for.cond
15 for.cond:                                         ; preds = %for.inc, %entry
16   %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
17   %cmp = icmp slt i32 %i.0, %N
18   br i1 %cmp, label %for.body, label %for.end
20 for.body:                                         ; preds = %for.cond
21   %sub = sub nsw i32 %N, %i.0
22   %arrayidx = getelementptr inbounds i32, i32* %A, i32 %sub
23   %tmp = load i32* %arrayidx, align 4
24   %add = add nsw i32 %tmp, 1
25   %arrayidx1 = getelementptr inbounds i32, i32* %A, i32 %i.0
26   store i32 %add, i32* %arrayidx1, align 4
27   br label %for.inc
29 for.inc:                                          ; preds = %for.body
30   %inc = add nsw i32 %i.0, 1
31   br label %for.cond
33 for.end:                                          ; preds = %for.cond
34   ret void