1 ; RUN: opt %loadNPMPolly '-passes=polly-import-jscop,print<polly-simplify>' -polly-import-jscop-postfix=transformed -disable-output < %s | FileCheck -match-full-lines %s
3 ; Remove identical writes
4 ; (two stores in the same statement that write the same value to the same
7 ; for (int j = 0; j < n; j += 1) {
17 define void @overwritten_scalar(i32 %n, ptr noalias nonnull %A) {
22 %j = phi i32 [0, %entry], [%j.inc, %inc]
23 %j.cmp = icmp slt i32 %j, %n
24 br i1 %j.cmp, label %body, label %exit
27 %val = fadd double 21.0, 21.0
31 %phi = phi double [%val, %body]
32 %add = fadd double %val, %phi
33 store double %add, ptr %A
37 %j.inc = add nuw nsw i32 %j, 1
49 ; CHECK: Overwrites removed: 1
53 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
54 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_val[] };
55 ; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[1] };
56 ; CHECK-NEXT: Stmt_user