236
|
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 ;
|
|
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
8
|
252
|
9 define void @test(i64 %n, ptr noalias nonnull %A, float %a) {
|
236
|
10 entry:
|
|
11 br label %entry.split
|
|
12
|
|
13 ; CHECK-LABEL: %polly.split_new_and_old
|
252
|
14 ; CHECK-NEXT: store float %a, ptr %b.phiops
|
236
|
15
|
|
16 ; CHECK-LABEL: polly.stmt.entry.split
|
252
|
17 ; CHECK-NEXT: %b.phiops.reload = load float, ptr %b.phiops
|
236
|
18
|
|
19 entry.split:
|
|
20 %b = phi float [ %a, %entry ]
|
252
|
21 store float %b, ptr %A, align 4
|
236
|
22 %cmp2 = icmp slt i64 %n, 5
|
|
23 br i1 %cmp2, label %for.cond, label %for.end
|
|
24
|
|
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
|
|
29
|
|
30 for.body: ; preds = %for.cond
|
252
|
31 %arrayidx = getelementptr inbounds float, ptr %A, i64 %i.0
|
|
32 store float %a, ptr %arrayidx, align 4
|
236
|
33 br label %for.inc
|
|
34
|
|
35 for.inc: ; preds = %for.body
|
|
36 %add = add nuw nsw i64 %i.0, 1
|
|
37 br label %for.cond
|
|
38
|
|
39 for.end: ; preds = %for.cond
|
|
40 ret void
|
|
41 }
|