1 ; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-delicm -disable-output -pass-remarks-missed=polly-delicm < %s 2>&1 | FileCheck %s
3 ; void func(double *A) {
4 ; for (int j = 0; j < 2; j += 1) { /* outer */
6 ; for (int i = 0; i < 4; i += 1) /* reduction */
13 define void @func(ptr noalias nonnull %A) {
15 br label %outer.preheader
21 %j = phi i32 [0, %outer.preheader], [%j.inc, %outer.inc]
22 %j.cmp = icmp slt i32 %j, 2
23 br i1 %j.cmp, label %reduction.preheader, label %outer.exit
27 br label %reduction.for
30 %i = phi i32 [0, %reduction.preheader], [%i.inc, %reduction.inc]
31 %phi = phi double [0.0, %reduction.preheader], [%add, %reduction.inc]
32 %i.cmp = icmp slt i32 %i, 4
33 br i1 %i.cmp, label %body, label %reduction.exit
38 %add = fadd double %phi, 4.2
39 br label %reduction.inc
44 %i.inc = add nuw nsw i32 %i, 1
45 br label %reduction.for
48 %A_idx = getelementptr inbounds double, ptr %A, i32 %j
49 store double %phi, ptr %A_idx
50 %dummy = load double, ptr %A_idx
56 %j.inc = add nuw nsw i32 %j, 1
67 ; CHECK: load after store of same element in same statement