1; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-allow-nonaffine-loops -polly-scops -analyze < %s | FileCheck %s 2; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-allow-nonaffine-loops -polly-codegen -analyze 3; 4; CHECK: Stmt_loop3 5; CHECK: Domain := 6; CHECK: [indvar] -> { Stmt_loop3[0] : indvar >= 101 or indvar <= 99 }; 7; CHECK: Schedule := 8; CHECK: [indvar] -> { Stmt_loop3[i0] -> [0, 0] : indvar >= 101 or indvar <= 99 }; 9; CHECK: Stmt_loop2__TO__loop 10; CHECK: Domain := 11; CHECK: [indvar] -> { Stmt_loop2__TO__loop[] : indvar >= 101 or indvar <= 99 }; 12; CHECK: Schedule := 13; CHECK: [indvar] -> { Stmt_loop2__TO__loop[] -> [1, 0] : indvar >= 101 or indvar <= 99 }; 14; 15define void @foo(i64* %A, i64 %p) { 16entry: 17 br label %loop 18 19loop: 20 %indvar.3 = phi i64 [0, %entry], [%indvar.3, %loop], [%indvar.next.3, %next2], [%indvar.next.3, %cond] 21 %indvar = phi i64 [0, %entry], [%indvar.next, %loop], [0, %next2], [0, %cond] 22 %indvar.next = add i64 %indvar, 1 23 fence seq_cst 24 %cmp = icmp eq i64 %indvar, 100 25 br i1 %cmp, label %next, label %loop 26 27next: 28 %indvar.next.3 = add i64 %indvar.3, 1 29 %cmp.3 = icmp eq i64 %indvar, 100 30 br i1 %cmp.3, label %loop3, label %exit 31 32loop3: 33 %indvar.6 = phi i64 [0, %next], [%indvar.next.6, %loop3] 34 %indvar.next.6 = add i64 %indvar.6, 1 35 %cmp.6 = icmp eq i64 %indvar.6, 100 36 br i1 %cmp.3, label %loop3, label %loop2 37 38loop2: 39 %indvar.2 = phi i64 [0, %loop3], [%indvar.next.2, %loop2], [0, %cond] 40 %indvar.next.2 = add i64 %indvar.2, 1 41 %prod = mul i64 %indvar.2, %indvar.2 42 store i64 %indvar, i64* %A 43 %cmp.2 = icmp eq i64 %prod, 100 44 br i1 %cmp.2, label %loop2, label %next2 45 46next2: 47 %cmp.4 = icmp eq i64 %p, 100 48 br i1 %cmp.4, label %loop, label %cond 49 50cond: 51 br i1 false, label %loop, label %loop2 52 53exit: 54 ret void 55} 56