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