1 ; RUN: opt %loadPolly -polly-detect-unprofitable -polly-no-early-exit -polly-ast -analyze -S < %s | FileCheck %s
12 ; __sync_synchronize();
14 ; for (i = 0; i < INT_MAX; i++)
17 ; __sync_synchronize();
19 ; if (A[0] == INT_MAX - 1)
25 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"
26 target triple = "x86_64-unknown-linux-gnu"
28 define i32 @main() nounwind {
30 %A = alloca [20 x i32], align 4 ; <[20 x i32]*> [#uses=3]
31 %arraydecay = getelementptr inbounds [20 x i32], [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
32 %arrayidx = getelementptr inbounds i32, i32* %arraydecay, i64 0 ; <i32*> [#uses=1]
33 store i32 0, i32* %arrayidx
37 for.cond: ; preds = %for.inc, %entry
38 %0 = phi i32 [ 0, %entry ], [ %inc, %for.inc ] ; <i32> [#uses=3]
39 %exitcond = icmp ne i32 %0, 2147483647 ; <i1> [#uses=1]
40 br i1 %exitcond, label %for.body, label %for.end
42 for.body: ; preds = %for.cond
43 %arraydecay2 = getelementptr inbounds [20 x i32], [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
44 %arrayidx3 = getelementptr inbounds i32, i32* %arraydecay2, i64 0 ; <i32*> [#uses=1]
45 store i32 %0, i32* %arrayidx3
48 for.inc: ; preds = %for.body
49 %inc = add nsw i32 %0, 1 ; <i32> [#uses=1]
52 for.end: ; preds = %for.cond
54 %arraydecay5 = getelementptr inbounds [20 x i32], [20 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
55 %arrayidx6 = getelementptr inbounds i32, i32* %arraydecay5, i64 0 ; <i32*> [#uses=1]
56 %tmp7 = load i32* %arrayidx6 ; <i32> [#uses=1]
57 %cmp8 = icmp eq i32 %tmp7, 2147483646 ; <i1> [#uses=1]
58 br i1 %cmp8, label %if.then, label %if.else
60 if.then: ; preds = %for.end
63 if.else: ; preds = %for.end
66 return: ; preds = %if.else, %if.then
67 %retval.0 = phi i32 [ 0, %if.then ], [ 1, %if.else ] ; <i32> [#uses=1]
71 ; CHECK: for (int c0 = 0; c0 <= 2147483646; c0 += 1)
72 ; CHECK: Stmt_for_body(c0);