1 ; RUN: opt %loadPolly -polly-print-ast -polly-parallel -polly-parallel-force -disable-output < %s | FileCheck %s
2 ; RUN: opt %loadPolly -print-polyhedral-info -polly-check-parallel -disable-output < %s | FileCheck %s -check-prefix=PINFO
3 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"
6 ; for (i = 0; i < n; i++)
7 ; for (j = 0; j < n; j++)
10 @A = common global [1024 x [1024 x i32]] zeroinitializer
11 define void @bar(i64 %n) {
17 %i = phi i64 [ 0, %start ], [ %i.next, %loop.i.backedge ]
18 %exitcond.i = icmp ne i64 %i, %n
19 br i1 %exitcond.i, label %loop.j, label %ret
22 %j = phi i64 [ 0, %loop.i], [ %j.next, %loop.j.backedge ]
23 %exitcond.j = icmp ne i64 %j, %n
24 br i1 %exitcond.j, label %loop.body, label %loop.i.backedge
27 %scevgep = getelementptr [1024 x [1024 x i32] ], ptr @A, i64 0, i64 %j, i64 %i
28 store i32 1, ptr %scevgep
29 br label %loop.j.backedge
32 %j.next = add nsw i64 %j, 1
36 %i.next = add nsw i64 %i, 1
44 ; CHECK: if (n <= 1024)
45 ; CHECK: #pragma omp parallel for
46 ; CHECK: for (int c0 = 0; c0 < n; c0 += 1)
48 ; CHECK: for (int c1 = 0; c1 < n; c1 += 1)
49 ; CHECK: Stmt_loop_body(c0, c1);
51 ; PINFO: loop.i: Loop is parallel.
52 ; PINFO-NEXT: loop.j: Loop is parallel.