• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt %loadPolly -polly-delicm -analyze -pass-remarks-missed=polly-delicm < %s 2>&1 | FileCheck %s
2;
3;    void func(double *A) {
4;      double phi = 0.0;
5;      for (int i = 0; i < 4; i += 1) /* reduction */
6;        phi += 4.2;
7;      A[0] = phi;
8;    }
9;
10define void @func(double* noalias nonnull %A) {
11entry:
12  br label %reduction.preheader
13
14  reduction.preheader:
15    br label %reduction.for
16
17  reduction.for:
18    %i = phi i32 [0, %reduction.preheader], [%i.inc, %reduction.inc]
19    %phi = phi double [0.0, %reduction.preheader], [%add, %reduction.inc]
20    %i.cmp = icmp slt i32 %i, 4
21    br i1 %i.cmp, label %body, label %reduction.exit
22
23
24
25      body:
26        %add = fadd double %phi, 4.2
27        br label %reduction.inc
28
29
30
31  reduction.inc:
32    %i.inc = add nuw nsw i32 %i, 1
33    br label %reduction.for
34
35  reduction.exit:
36    store double %phi, double* %A
37    br label %return
38
39
40return:
41  ret void
42}
43
44
45; CHECK: skipped possible mapping target because it is not in a loop
46