1 ; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
3 ; Remove a dead PHI write/read pair
4 ; (accesses that are effectively not used)
6 ; for (int j = 0; j < n; j += 1) {
14 define void @func(i32 %n, double* noalias nonnull %A) {
19 %j = phi i32 [0, %entry], [%j.inc, %inc]
20 %j.cmp = icmp slt i32 %j, %n
21 br i1 %j.cmp, label %body, label %exit
27 %phi = phi double [42.0, %body]
28 store double 42.0, double* %A
32 %j.inc = add nuw nsw i32 %j, 1
44 ; CHECK: Dead accesses removed: 2
45 ; CHECK: Dead instructions removed: 1
46 ; CHECK: Stmts removed: 1
49 ; CHECK: After accesses {
50 ; CHECK-NEXT: Stmt_body_succ
51 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
52 ; CHECK-NEXT: [n] -> { Stmt_body_succ[i0] -> MemRef_A[0] };