| ; RUN: opt %loadNPMPolly '-passes=print<polly-optree>' -disable-output < %s | FileCheck %s -match-full-lines |
| ; Ensure we do not move instructions from region statements in case the |
| ; instruction to move loads from an array which is also written to from |
| ; within the region. This is necessary as complex region statements may prevent |
| ; us from detecting possible memory conflicts. |
| ; for (int j = 0; j < n; j += 1) { |
| define void @func(i32 %n, ptr noalias nonnull %A) { |
| %j = phi i32 [0, %entry], [%j.inc, %inc] |
| %j.cmp = icmp slt i32 %j, %n |
| br i1 %j.cmp, label %bodyA, label %exit |
| %val = load double, ptr %A |
| %cond = fcmp oeq double 21.0, 21.0 |
| br i1 %cond, label %bodyA_true, label %bodyB |
| store double 42.0, ptr %A |
| store double %val, ptr %A |
| %j.inc = add nuw nsw i32 %j, 1 |
| ; CHECK: ForwardOpTree executed, but did not modify anything |