1 ; RUN: opt %loadNPMPolly '-passes=polly-import-jscop,print<polly-simplify>' -polly-import-jscop-postfix=transformed -disable-output < %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, ptr 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, ptr %A
18 br label %region_entry
21 %val2 = load double, ptr %A
22 %cmp = fcmp oeq double %val1, 0.0
23 br i1 %cmp, label %region_true, label %region_exit
32 store double %val2, ptr %A
37 %j.inc = add nuw nsw i32 %j, 1
49 ; CHECK: Redundant writes removed: 3
52 ; CHECK: After accesses {