1 ; RUN: opt %loadNPMPolly -passes=polly-codegen -S < %s
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.
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 define void @test(i64 %n, ptr noalias nonnull %A, float %a) {
13 ; CHECK-LABEL: %polly.split_new_and_old
14 ; CHECK-NEXT: store float %a, ptr %b.phiops
16 ; CHECK-LABEL: polly.stmt.entry.split
17 ; CHECK-NEXT: %b.phiops.reload = load float, ptr %b.phiops
20 %b = phi float [ %a, %entry ]
21 store float %b, ptr %A, align 4
22 %cmp2 = icmp slt i64 %n, 5
23 br i1 %cmp2, label %for.cond, label %for.end
25 for.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
30 for.body: ; preds = %for.cond
31 %arrayidx = getelementptr inbounds float, ptr %A, i64 %i.0
32 store float %a, ptr %arrayidx, align 4
35 for.inc: ; preds = %for.body
36 %add = add nuw nsw i64 %i.0, 1
39 for.end: ; preds = %for.cond