Update Polly tests to handle explicitly typed gep changes in LLVM
[polly-mirror.git] / test / ScopInfo / non_affine_parametric_loop.ll
blobaf51775c30b33be23488d5b0d39ca4e70d31af26
1 ; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-scops -analyze -polly-allow-nonaffine < %s | FileCheck %s
2 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
3 target triple = "x86_64-unknown-linux-gnu"
5 ; void foo(long n, double A[], int INDEX[]) {
6 ;   for (long i = 0; i < n; i++)
7 ;     A[INDEX[i]] = i;
8 ; }
10 define void @foo(i64 %n, double* noalias %A, i64* noalias %INDEX) {
11 entry:
12   br label %for.body
14 for.body:
15   %i = phi i64 [ %inc, %for.body ], [ 0, %entry ]
16   %arrayidx = getelementptr inbounds i64, i64* %INDEX, i64 %i
17   %val = load i64* %arrayidx
18   %arrayidx1 = getelementptr inbounds double, double* %A, i64 %val
19   store double 1.0, double* %arrayidx1
20   %inc = add nsw i64 %i, 1
21   %exitcond = icmp eq i64 %inc, %n
22   br i1 %exitcond, label %for.end, label %for.body
24 for.end:
25   ret void
28 ; CHECK: p0: %n
30 ; CHECK: Domain
31 ; CHECK:   [n] -> { Stmt_for_body[i0] : i0 >= 0 and i0 <= -1 + n };
32 ; CHECK: Scattering
33 ; CHECK:   [n] -> { Stmt_for_body[i0] -> [i0] };
34 ; CHECK: ReadAccess
35 ; CHECK:   [n] -> { Stmt_for_body[i0] -> MemRef_INDEX[i0] };
36 ; CHECK: WriteAccess
37 ; CHECK:   [n] -> { Stmt_for_body[i0] -> MemRef_A[o0] : o0 >= -1152921504606846976 and o0 <= 1152921504606846973 };