1 ; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-print-delicm -disable-output < %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
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.
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 define void @confused_order(ptr nocapture %C, i32 %rows, i32 %cols) {
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
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
30 store double %a_dot_b_domain.0.lcssa, ptr %C
38 ; REMARKS-NOT: load after store of same element in same statement
39 ; CHECK: No modification has been made