1; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck %s -match-full-lines 2; RUN: opt %loadPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines 3; 4; Do not remove redundant stores in the middle of region statements. 5; The store in region_true could be removed, but in practice we do try to 6; determine the relative ordering of block in region statements. 7; 8; for (int j = 0; j < n; j += 1) { 9; double val = A[0]; 10; if (val == 0.0) 11; A[0] = val; 12; else 13; A[0] = 0.0; 14; } 15; 16define void @notredundant_region(i32 %n, double* noalias nonnull %A) { 17entry: 18 br label %for 19 20for: 21 %j = phi i32 [0, %entry], [%j.inc, %inc] 22 %j.cmp = icmp slt i32 %j, %n 23 br i1 %j.cmp, label %region_entry, label %exit 24 25 26 region_entry: 27 %val = load double, double* %A 28 %cmp = fcmp oeq double %val, 0.0 29 br i1 %cmp, label %region_true, label %region_false 30 31 region_true: 32 store double %val, double* %A 33 br label %region_exit 34 35 region_false: 36 store double 0.0, double* %A 37 br label %region_exit 38 39 region_exit: 40 br label %inc 41 42 43inc: 44 %j.inc = add nuw nsw i32 %j, 1 45 br label %for 46 47exit: 48 br label %return 49 50return: 51 ret void 52} 53 54 55; CHECK: SCoP could not be simplified 56