1 ; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
3 ; Remove redundant store (a store that writes the same value already
4 ; at the destination) in a region.
6 define void @redundant_region_scalar(i32 %n, double* noalias nonnull %A) {
11 %j = phi i32 [0, %entry], [%j.inc, %inc]
12 %j.cmp = icmp slt i32 %j, %n
13 br i1 %j.cmp, label %bodyA, label %exit
17 %val1 = load double, double* %A
18 br label %region_entry
21 %val2 = load double, double* %A
22 %cmp = fcmp oeq double %val1, 0.0
23 br i1 %cmp, label %region_true, label %region_exit
32 store double %val2, double* %A
37 %j.inc = add nuw nsw i32 %j, 1
49 ; CHECK: Redundant writes removed: 3
52 ; CHECK: After accesses {