1 ; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
3 ; Remove a dead load-instruction
4 ; (an load whose result is not used anywhere)
6 ; for (int j = 0; j < n; j += 1) {
11 define void @func(i32 %n, ptr noalias nonnull %A) {
16 %j = phi i32 [0, %entry], [%j.inc, %inc]
17 %j.cmp = icmp slt i32 %j, %n
18 br i1 %j.cmp, label %body, label %exit
21 %val = load double, ptr %A
22 store double 42.0, ptr %A
26 %j.inc = add nuw nsw i32 %j, 1
38 ; CHECK: Dead accesses removed: 1
39 ; CHECK: Dead instructions removed: 1
42 ; CHECK: After accesses {
43 ; CHECK-NEXT: Stmt_body
44 ; CHECK-NEXT: MustWriteAccess := [Reduction Type: NONE] [Scalar: 0]
45 ; CHECK-NEXT: [n] -> { Stmt_body[i0] -> MemRef_A[0] };