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