1 ; RUN: opt %loadNPMPolly '-passes=print<polly-optree>' -disable-output < %s | FileCheck %s -match-full-lines
3 ; B[j] is overwritten by at least one statement between the
4 ; definition of %val and its use. Hence, it cannot be forwarded.
6 ; for (int j = 0; j < n; j += 1) {
18 define void @func(i32 %n, ptr noalias nonnull %A, ptr noalias nonnull %B) {
23 %j = phi i32 [0, %entry], [%j.inc, %inc]
24 %j.cmp = icmp slt i32 %j, %n
25 br i1 %j.cmp, label %bodyA, label %exit
28 %B_idx = getelementptr inbounds double, ptr %B, i32 %j
29 %val = load double, ptr %B_idx
30 %cond = icmp slt i32 %j, 1
31 br i1 %cond, label %bodyA_true, label %bodyB
34 store double 0.0, ptr %B_idx
38 %A_idx = getelementptr inbounds double, ptr %A, i32 %j
39 store double %val, ptr %A_idx
43 %j.inc = add nuw nsw i32 %j, 1
54 ; CHECK: ForwardOpTree executed, but did not modify anything