1; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck %s -match-full-lines 2; 3; Remove redundant store (a store that writes the same value already 4; at the destination) in a region. 5; 6define void @redundant_region(i32 %n, double* noalias nonnull %A) { 7entry: 8 br label %for 9 10for: 11 %j = phi i32 [0, %entry], [%j.inc, %inc] 12 %j.cmp = icmp slt i32 %j, %n 13 br i1 %j.cmp, label %region_entry, label %exit 14 15 16 region_entry: 17 %val = load double, double* %A 18 %cmp = fcmp oeq double %val, 0.0 19 br i1 %cmp, label %region_true, label %region_exit 20 21 region_true: 22 br label %region_exit 23 24 region_exit: 25 br label %body 26 27 body: 28 store double %val, double* %A 29 br label %inc 30 31 32inc: 33 %j.inc = add nuw nsw i32 %j, 1 34 br label %for 35 36exit: 37 br label %return 38 39return: 40 ret void 41} 42 43 44; CHECK: Statistics { 45; CHECK: Redundant writes removed: 2 46; CHECK: } 47 48; CHECK: After accesses { 49; CHECK-NEXT: } 50