brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · b8eefe5 Raw
69 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<flatten;delicm>' -polly-print-delicm -disable-output < %s | FileCheck %s2;3;    void func(double *A) {4;      for (int j = 0; j < 2; j += 1) { /* outer */5;        for (int i = 0; i < 4; i += 1) { /* reduction */6;          double phi = A[j];7;          phi += 4.2;8;          A[j] = phi;9;        }10;      }11;    }12;13; There is nothing to do in this case. All accesses are in %body.14;15define void @func(ptr noalias nonnull %A) {16entry:17  br label %outer.preheader18 19outer.preheader:20  br label %outer.for21 22outer.for:23  %j = phi i32 [0, %outer.preheader], [%j.inc, %outer.inc]24  %j.cmp = icmp slt i32 %j, 225  br i1 %j.cmp, label %reduction.preheader, label %outer.exit26 27 28    reduction.preheader:29      br label %reduction.for30 31    reduction.for:32      %i = phi i32 [0, %reduction.preheader], [%i.inc, %reduction.inc]33      br label %body34 35 36 37        body:38          %A_idx = getelementptr inbounds double, ptr %A, i32 %j39          %val = load double, ptr %A_idx40          %add = fadd double %val, 4.241          store double %add, ptr %A_idx42          br label %reduction.inc43 44 45 46    reduction.inc:47      %i.inc = add nuw nsw i32 %i, 148      %i.cmp = icmp slt i32 %i.inc, 449      br i1 %i.cmp, label %reduction.for, label %reduction.exit50 51    reduction.exit:52      br label %outer.inc53 54 55 56outer.inc:57  %j.inc = add nuw nsw i32 %j, 158  br label %outer.for59 60outer.exit:61  br label %return62 63return:64  ret void65}66 67 68; CHECK: No modification has been made69