1 ; RUN: opt %loadPolly -polly-print-delicm -disable-output < %s | FileCheck %s
3 ; void func(double *A) {
4 ; fsomeval = 21.0 + 21.0;
5 ; for (int j = 0; j < 2; j += 1) { /* outer */
7 ; for (int i = 0; i < 4; i += 1) /* reduction */
13 ; Check that fsomeval is not mapped to A[j] because it is read-only.
14 ; There is no advantage in mapping values not modified within the SCoP.
16 define void @func(ptr noalias nonnull %A) {
18 %fsomeval = fadd double 21.0, 21.0
19 br label %outer.preheader
25 %j = phi i32 [0, %outer.preheader], [%j.inc, %outer.inc]
26 %j.cmp = icmp slt i32 %j, 2
27 br i1 %j.cmp, label %reduction.preheader, label %outer.exit
31 br label %reduction.for
34 %i = phi i32 [0, %reduction.preheader], [%i.inc, %reduction.inc]
35 %phi = phi double [0.0, %reduction.preheader], [%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 %fsomeval, ptr %A_idx
59 %j.inc = add nuw nsw i32 %j, 1
71 ; CHECK: Compatible overwrites: 1
73 ; CHECK: No modification has been made