1 ; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
2 ; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
4 ; Remove a dead PHI write/read pair
5 ; (accesses that are effectively not used)
7 ; for (int j = 0; j < n; j += 1) {
15 define void @func(i32 %n, ptr noalias nonnull %A) {
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
28 %phi = phi double [42.0, %body]
29 store double 42.0, ptr %A
33 %j.inc = add nuw nsw i32 %j, 1
45 ; CHECK: Dead accesses removed: 2
46 ; CHECK: Dead instructions removed: 1
47 ; CHECK: Stmts removed: 1
50 ; CHECK: After accesses {
51 ; CHECK-NEXT: Stmt_body_succ
52 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
53 ; CHECK-NEXT: [n] -> { Stmt_body_succ[i0] -> MemRef_A[0] };