1 ; RUN: opt %loadPolly -polly-print-ast -polly-ast-detect-parallel -disable-output < %s | FileCheck %s
3 ; The minimal dependence distance of the innermost loop should be 1 instead of 250.
4 ; CHECK: #pragma minimal dependence distance: 1
5 ; CHECK: for (int c0 = 0; c0 <= 499; c0 += 1)
6 ; CHECK: #pragma minimal dependence distance: 1
7 ; CHECK: for (int c1 = 0; c1 <= 998; c1 += 1) {
8 ; CHECK: Stmt_bb9(c0, c1);
9 ; CHECK: Stmt_bb9_b(c0, c1);
11 ; void foo (int *A, int *B) {
12 ; for (int i=0; i < 500; i++) {
13 ; for (int j=0; j < 1000; j++) {
20 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
22 define void @foo(ptr nocapture %arg, ptr nocapture %arg1) {
32 bb4: ; preds = %bb6, %bb2
33 %tmp = phi i32 [ 0, %bb2 ], [ %tmp7, %bb6 ]
34 %tmp5 = getelementptr inbounds i32, ptr %arg1, i32 %tmp
38 %tmp7 = add nuw nsw i32 %tmp, 1
39 %tmp8 = icmp eq i32 %tmp7, 500
40 br i1 %tmp8, label %bb3, label %bb4
42 bb9: ; preds = %bb9, %bb4
43 %tmp10 = phi i32 [ 1, %bb4 ], [ %tmp19, %bb9 ]
44 %tmp11 = load i32, ptr %tmp5, align 4
45 %tmp12 = add nsw i32 %tmp11, 1
46 store i32 %tmp12, ptr %tmp5, align 4
47 %tmp13 = urem i32 %tmp10, 250
48 %tmp14 = getelementptr inbounds i32, ptr %arg, i32 %tmp13
49 %tmp15 = load i32, ptr %tmp14, align 4
50 %tmp16 = getelementptr inbounds i32, ptr %arg, i32 %tmp10
51 %tmp17 = load i32, ptr %tmp16, align 4
52 %tmp18 = add nsw i32 %tmp17, %tmp15
53 store i32 %tmp18, ptr %tmp16, align 4
54 %tmp19 = add nuw nsw i32 %tmp10, 1
55 %tmp20 = icmp eq i32 %tmp19, 1000
56 br i1 %tmp20, label %bb6, label %bb9