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 a store that is overwritten by another store in the same statement.
4 ; Check that this works even if one of the writes is a scalar MemoryKind.
6 ; for (int j = 0; j < n; j += 1) {
15 define void @overwritten_implicit_and_explicit(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %C) {
20 %j = phi i32 [0, %entry], [%j.inc, %inc]
21 %j.cmp = icmp slt i32 %j, %n
22 br i1 %j.cmp, label %body, label %exit
25 %val = fadd double 21.0, 21.0
26 store double %val, ptr %A
30 store double %val, ptr %C
34 %j.inc = add nuw nsw i32 %j, 1
46 ; CHECK: Overwrites removed: 1
50 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 1]
51 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_val[] };
52 ; CHECK-NEXT: new: [n] -> { Stmt_body[i0] -> MemRef_A[0] };
53 ; CHECK-NEXT: Stmt_user