1; RUN: opt %loadPolly -polly-codegen -S < %s
2;
3; The entry of this scop's simple region (entry.split => for.end) has an trivial
4; PHI node. LCSSA may create such PHI nodes. This is a breakdown of this case in
5; the function 'Laguerre_With_Deflation' of oggenc from LLVM's test-suite.
6;
7target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8
9define void @test(i64 %n, float* noalias nonnull %A, float %a) {
10entry:
11  br label %entry.split
12
13; CHECK-LABEL: %polly.split_new_and_old
14; CHECK-NEXT:    store float %a, float* %b.phiops
15
16; CHECK-LABEL: polly.stmt.entry.split
17; CHECK-NEXT:    %b.phiops.reload = load float, float* %b.phiops
18
19entry.split:
20  %b = phi float [ %a, %entry ]
21  store float %b, float* %A, align 4
22  %cmp2 = icmp slt i64 %n, 5
23  br i1 %cmp2, label %for.cond, label %for.end
24
25for.cond:                                         ; preds = %for.inc, %entry
26  %i.0 = phi i64 [ 0, %entry.split ], [ %add, %for.inc ]
27  %cmp = icmp slt i64 %i.0, %n
28  br i1 %cmp, label %for.body, label %for.end
29
30for.body:                                         ; preds = %for.cond
31  %arrayidx = getelementptr inbounds float, float* %A, i64 %i.0
32  store float %a, float* %arrayidx, align 4
33  br label %for.inc
34
35for.inc:                                          ; preds = %for.body
36  %add = add nuw nsw i64 %i.0, 1
37  br label %for.cond
38
39for.end:                                          ; preds = %for.cond
40  ret void
41}
42