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
5 ; CHECK: #pragma omp parallel for
6 ; PINFO: for.cond2: Loop is parallel.
7 ; for (int i = 0; i < 1024; i++)
9 ; CHECK: #pragma omp parallel for
10 ; PINFO: for.cond: Loop is parallel.
11 ; for (int i = 0; i < 1024; i++)
15 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 define void @jd(ptr %A) {
21 for.cond: ; preds = %for.inc, %entry
22 %indvars.iv1 = phi i64 [ %indvars.iv.next2, %for.inc ], [ 0, %entry ]
23 %exitcond3 = icmp ne i64 %indvars.iv1, 1024
24 br i1 %exitcond3, label %for.body, label %for.end
26 for.body: ; preds = %for.cond
27 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv1
28 store i32 1, ptr %arrayidx, align 4
31 for.inc: ; preds = %for.body
32 %indvars.iv.next2 = add nuw nsw i64 %indvars.iv1, 1
35 for.end: ; preds = %for.cond
38 for.cond2: ; preds = %for.inc9, %for.end
39 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc9 ], [ 0, %for.end ]
40 %exitcond = icmp ne i64 %indvars.iv, 1024
41 br i1 %exitcond, label %for.body4, label %for.end11
43 for.body4: ; preds = %for.cond2
44 %arrayidx6 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
45 %tmp = load i32, ptr %arrayidx6, align 4
46 %mul = shl nsw i32 %tmp, 1
47 %arrayidx8 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
48 store i32 %mul, ptr %arrayidx8, align 4
51 for.inc9: ; preds = %for.body4
52 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
55 for.end11: ; preds = %for.cond2