1 ; RUN: opt %loadNPMPolly '-passes=print<polly-ast>' -disable-output < %s
13 ; __sync_synchronize();
14 ; for (i = 0; i < N; i++) {
22 ; __sync_synchronize();
27 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"
29 @A = common global [100 x i32] zeroinitializer, align 16 ; <ptr> [#uses=2]
30 @k = common global i32 0, align 4 ; <ptr> [#uses=0]
32 define i32 @main() nounwind {
37 ; <label>:1 ; preds = %12, %0
38 %indvar = phi i64 [ %indvar.next, %12 ], [ 0, %0 ] ; <i64> [#uses=4]
39 %scevgep = getelementptr [100 x i32], ptr @A, i64 0, i64 %indvar ; <ptr> [#uses=3]
40 %i.0 = trunc i64 %indvar to i32 ; <i32> [#uses=3]
41 %exitcond = icmp ne i64 %indvar, 100 ; <i1> [#uses=1]
42 br i1 %exitcond, label %2, label %13
44 ; <label>:2 ; preds = %1
45 %3 = icmp slt i32 %i.0, 50 ; <i1> [#uses=1]
46 br i1 %3, label %4, label %5
48 ; <label>:4 ; preds = %2
49 store i32 8, ptr %scevgep
52 ; <label>:5 ; preds = %4, %2
53 %6 = icmp slt i32 %i.0, 4 ; <i1> [#uses=1]
54 br i1 %6, label %7, label %8
56 ; <label>:7 ; preds = %5
57 store i32 9, ptr %scevgep
60 ; <label>:8 ; preds = %7, %5
61 %9 = icmp slt i32 %i.0, 3 ; <i1> [#uses=1]
62 br i1 %9, label %10, label %11
64 ; <label>:10 ; preds = %8
65 store i32 10, ptr %scevgep
68 ; <label>:11 ; preds = %10, %8
71 ; <label>:12 ; preds = %11
72 %indvar.next = add i64 %indvar, 1 ; <i64> [#uses=1]
75 ; <label>:13 ; preds = %1
77 %14 = sext i32 undef to i64 ; <i64> [#uses=1]
78 %15 = getelementptr inbounds i32, ptr @A, i64 %14 ; <ptr> [#uses=1]
79 %16 = load i32, ptr %15 ; <i32> [#uses=1]
83 ; CHECK: for (c2=0;c2<=2;c2++) {
90 ; CHECK: for (c2=4;c2<=49;c2++) {