1; RUN: opt %loadNPMPolly '-passes=polly-import-jscop,print<polly-delicm>' -polly-import-jscop-postfix=transformed -disable-output < %s | FileCheck %s 2; RUN: opt %loadNPMPolly '-passes=polly-import-jscop,polly-delicm' -polly-import-jscop-postfix=transformed -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(ptr 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 store double %a_dot_b_domain.0.lcssa, ptr %C 25 %cmp109 = icmp slt i64 0, %1 26 %or.cond = and i1 %cmp108, %cmp109 27 br i1 %or.cond, label %if.then110, label %for.inc116 28 29if.then110: 30 store double %a_dot_b_domain.0.lcssa, ptr %C 31 br label %for.inc116 32 33for.inc116: 34 ret void 35} 36 37 38; REMARKS-NOT: load after store of same element in same statement 39; CHECK: No modification has been made 40