1 ; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb '-passes=polly-import-jscop,print<polly-simplify>' -polly-import-jscop-postfix=transformed -disable-output < %s | FileCheck -match-full-lines %s
3 ; Combine 3 partial accesses into one.
5 ; for (int j = 0; j < n; j += 1) {
11 define void @coalesce_3partials(i32 %n, ptr noalias nonnull %A) {
16 %j = phi i32 [0, %entry], [%j.inc, %inc]
17 %j.cmp = icmp slt i32 %j, %n
18 br i1 %j.cmp, label %body, label %exit
21 store double 42.0, ptr %A
22 store double 42.0, ptr %A
23 store double 42.0, ptr %A
27 %j.inc = add nuw nsw i32 %j, 1
39 ; CHECK: Overwrites removed: 0
40 ; CHECK: Partial writes coalesced: 2
43 ; CHECK: After accesses {
44 ; CHECK-NEXT: Stmt_body
45 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
46 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
47 ; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] };