1 ; RUN: opt %loadPolly -polly-print-ast -disable-output < %s | FileCheck %s
8 ;void single_do_loop_int_max_iterations() {
11 ; __sync_synchronize();
18 ; } while (i < INT_MAX);
20 ; __sync_synchronize();
28 ; single_do_loop_int_max_iterations();
30 ; fprintf(stdout, "Output %d\n", A[0]);
32 ; if (A[0] == INT_MAX - 1)
38 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"
40 %struct._IO_FILE = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i64, i32, [20 x i8] }
41 %struct._IO_marker = type { ptr, ptr, i32 }
43 @A = common global [20 x i32] zeroinitializer, align 4 ; <ptr> [#uses=1]
44 @stdout = external global ptr ; <ptr> [#uses=1]
45 @.str = private constant [11 x i8] c"Output %d\0A\00" ; <ptr> [#uses=1]
47 define void @single_do_loop_int_max_iterations() nounwind {
52 do.body: ; preds = %do.cond, %entry
53 %0 = phi i32 [ 0, %entry ], [ %inc, %do.cond ] ; <i32> [#uses=2]
55 %inc = add nsw i32 %0, 1 ; <i32> [#uses=2]
58 do.cond: ; preds = %do.body
59 %exitcond = icmp ne i32 %inc, 2147483647 ; <i1> [#uses=1]
60 br i1 %exitcond, label %do.body, label %do.end
62 do.end: ; preds = %do.cond
67 define i32 @main() nounwind {
70 call void @single_do_loop_int_max_iterations()
71 %tmp = load ptr, ptr @stdout ; <ptr> [#uses=1]
72 %tmp1 = load i32, ptr @A ; <i32> [#uses=1]
73 %call = call i32 (ptr, ptr, ...) @fprintf(ptr %tmp, ptr @.str, i32 %tmp1) ; <i32> [#uses=0]
74 %tmp2 = load i32, ptr @A ; <i32> [#uses=1]
75 %cmp = icmp eq i32 %tmp2, 2147483646 ; <i1> [#uses=1]
76 br i1 %cmp, label %if.then, label %if.else
78 if.then: ; preds = %entry
81 if.else: ; preds = %entry
84 return: ; preds = %if.else, %if.then
85 %retval.0 = phi i32 [ 0, %if.then ], [ 1, %if.else ] ; <i32> [#uses=1]
89 declare i32 @fprintf(ptr, ptr, ...)
91 ; CHECK: for (int c0 = 0; c0 <= 2147483646; c0 += 1)
92 ; CHECK: Stmt_do_body(c0);