47 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<simplify>' -polly-print-simplify -disable-output -aa-pipeline=basic-aa < %s | FileCheck -match-full-lines %s2;3; Do not remove overwrites when the value is read before.4;5; for (int j = 0; j < n; j += 1) {6;body:7; A[0] = 21.0;8; val = A[0];9; A[0] = 42.0;10;11;user:12; B[0] = val;13; }14;15define void @overwritten(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B) {16entry:17 br label %for18 19for:20 %j = phi i32 [0, %entry], [%j.inc, %inc]21 %j.cmp = icmp slt i32 %j, %n22 br i1 %j.cmp, label %body, label %exit23 24 body:25 store double 21.0, ptr %A26 %val = load double, ptr %A27 store double 42.0, ptr %A28 br label %user29 30 user:31 store double %val, ptr %B32 br label %inc33 34inc:35 %j.inc = add nuw nsw i32 %j, 136 br label %for37 38exit:39 br label %return40 41return:42 ret void43}44 45 46; CHECK: SCoP could not be simplified47