1 ; RUN: opt %loadPolly -polly-optree-normalize-phi=true -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines
3 ; Contains a self-referencing PHINode that would require a
4 ; transitive closure to handle.
6 ; for (int j = 0; j < n; j += 1) {
8 ; for (int i = 0; i < m; i += 1)
13 define void @func(i32 %n, i32 %m, ptr noalias nonnull %A) {
18 %j = phi i32 [0, %entry], [%j.inc, %inc]
19 %j.cmp = icmp slt i32 %j, %n
20 br i1 %j.cmp, label %for.preheader, label %exit
26 %i = phi i32 [0, %for.preheader], [%i.inc, %for.inner]
27 %phi = phi double [0.0, %for.preheader], [%phi, %for.inner]
28 %i.inc = add nuw nsw i32 %i, 1
29 %i.cmp = icmp slt i32 %i.inc, %m
30 br i1 %i.cmp, label %for.inner, label %for.exit
33 %A_idx = getelementptr inbounds double, ptr %A, i32 %j
34 store double %phi, ptr %A_idx
38 %j.inc = add nuw nsw i32 %j, 1
49 ; CHECK: ForwardOpTree executed, but did not modify anything