1 ; RUN: opt %loadPolly %defaultOpts -polly-analyze-ir -analyze %s | not FileCheck %s
3 ;void f(long a[], long N, long M) {
5 ; for (j = 0; j < M; ++j)
14 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"
15 target triple = "x86_64-unknown-linux-gnu"
17 define void @f(i64* nocapture %a, i64 %N, i64 %M) nounwind {
19 %0 = icmp sgt i64 %M, 0 ; <i1> [#uses=1]
20 br i1 %0, label %bb, label %return
22 bb: ; preds = %bb3, %entry
23 %1 = phi i64 [ 0, %entry ], [ %3, %bb3 ] ; <i64> [#uses=5]
24 %scevgep = getelementptr i64* %a, i64 %1 ; <i64*> [#uses=2]
25 %2 = icmp slt i64 %1, %N ; <i1> [#uses=1]
26 br i1 %2, label %bb1, label %bb2
29 store i64 %1, i64* %scevgep, align 8
33 %tmp7 = sub i64 %1, %N ; <i64> [#uses=1]
34 %scevgep8 = getelementptr i64* %a, i64 %tmp7 ; <i64*> [#uses=1]
35 store i64 %M, i64* %scevgep, align 8
36 store i64 0, i64* %scevgep8, align 8
39 bb3: ; preds = %bb2, %bb1
40 %3 = add nsw i64 %1, 1 ; <i64> [#uses=2]
41 %exitcond = icmp eq i64 %3, %M ; <i1> [#uses=1]
42 br i1 %exitcond, label %return, label %bb
44 return: ; preds = %bb3, %entry