1; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-delicm -analyze < %s | FileCheck %s 2; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-delicm -disable-output -pass-remarks-missed=polly-delicm < %s 2>&1 | FileCheck %s -check-prefix=REMARKS 3; 4; ForwardOptree changes the SCoP and may already map some accesses. 5; DeLICM must be prepared to encounter implicit reads 6; (isOriginalScalarKind()) that occur at the beginning of the SCoP 7; to an array (isLatestArrayKind()). Otherwise it may confuse the 8; MemoryAccess execution order. 9 10target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 11 12define void @confused_order(double* nocapture %C, i32 %rows, i32 %cols) { 13entry: 14 %0 = sext i32 %cols to i64 15 %1 = sext i32 %rows to i64 16 %cmp108 = icmp slt i64 0, %0 17 br i1 undef, label %for.body7.lr.ph, label %for.end103 18 19for.body7.lr.ph: 20 br label %for.end103 21 22for.end103: 23 %a_dot_b_domain.0.lcssa = phi double [ 0.000000e+00, %entry ], [ undef, %for.body7.lr.ph ] 24 %arrayidx107 = getelementptr inbounds double, double* %C, i64 0 25 store double %a_dot_b_domain.0.lcssa, double* %arrayidx107 26 %cmp109 = icmp slt i64 0, %1 27 %or.cond = and i1 %cmp108, %cmp109 28 br i1 %or.cond, label %if.then110, label %for.inc116 29 30if.then110: 31 %arrayidx114 = getelementptr inbounds double, double* %C, i64 0 32 store double %a_dot_b_domain.0.lcssa, double* %arrayidx114 33 br label %for.inc116 34 35for.inc116: 36 ret void 37} 38 39 40; REMARKS-NOT: load after store of same element in same statement 41; CHECK: No modification has been made 42