1 ; RUN: opt %loadPolly -polly-delicm -pass-remarks-missed=polly-delicm -disable-output < %s 2>&1 | FileCheck %s
6 ; The memset causes the array A to be divided into i8-sized subelements.
7 ; The the regular store then writes multiple of these subelements, which
8 ; we do not support currently.
10 ; void func(double *A) {
12 ; for (int j = 0; j < 2; j += 1) { /* outer */
14 ; for (int i = 0; i < 4; i += 1) /* reduction */
20 declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i32, i1)
22 define void @func(ptr noalias nonnull %A) {
27 %j = phi i32 [0, %entry], [%j.inc, %outer.inc]
28 call void @llvm.memset.p0.i64(ptr %A, i8 0, i64 4, i32 1, i1 false)
29 %j.cmp = icmp slt i32 %j, 2
30 br i1 %j.cmp, label %reduction.for, label %outer.exit
34 %i = phi i32 [0, %outer.for], [%i.inc, %reduction.inc]
35 %phi = phi double [0.0, %outer.for], [%add, %reduction.inc]
36 %i.cmp = icmp slt i32 %i, 4
37 br i1 %i.cmp, label %body, label %reduction.exit
42 %add = fadd double %phi, 4.2
43 br label %reduction.inc
48 %i.inc = add nuw nsw i32 %i, 1
49 br label %reduction.for
52 %A_idx = getelementptr inbounds double, ptr %A, i32 %j
53 store double %phi, ptr %A_idx
59 %j.inc = add nuw nsw i32 %j, 1
70 ; CHECK: skipped possible mapping target because it writes more than one element