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 value write/read pair
5 ; (accesses that are effectively not used)
7 ; for (int j = 0; j < n; j += 1) {
9 ; double val = 12.5 + 12.5;
12 ; double unused = val + 21.0;
16 define void @func(i32 %n, ptr noalias nonnull %A) {
21 %j = phi i32 [0, %entry], [%j.inc, %inc]
22 %j.cmp = icmp slt i32 %j, %n
23 br i1 %j.cmp, label %body, label %exit
26 %val = fadd double 12.5, 12.5
30 %unused = fadd double %val, 21.0
31 store double 42.0, ptr %A
35 %j.inc = add nuw nsw i32 %j, 1
47 ; CHECK: Dead accesses removed: 2
48 ; CHECK: Dead instructions removed: 2
49 ; CHECK: Stmts removed: 1
52 ; CHECK: After accesses {
53 ; CHECK-NEXT: Stmt_body_succ
54 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
55 ; CHECK-NEXT: [n] -> { Stmt_body_succ[i0] -> MemRef_A[0] };