| ; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck %s -match-full-lines |
| ; Remove redundant store (a store that writes the same value already |
| ; at the destination) in a region. |
| define void @redundant_region_scalar(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 %bodyA, label %exit |
| %val1 = load double, double* %A |
| %val2 = load double, double* %A |
| %cmp = fcmp oeq double %val1, 0.0 |
| br i1 %cmp, label %region_true, label %region_exit |
| store double %val2, double* %A |
| %j.inc = add nuw nsw i32 %j, 1 |
| ; CHECK: Redundant writes removed: 3 |
| ; CHECK: After accesses { |