llvm-project
58 строк · 1.9 Кб
1; RUN: opt %loadNPMPolly -passes=polly-codegen -S < %s | FileCheck %s
2;
3; Verify we do not crash when we synthezise code for the udiv in the SCoP.
4;
5; CHECK: polly.start
6;
7target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8
9; Function Attrs: nounwind uwtable
10define void @RestartModel() #0 {
11entry:
12br label %for.cond32.preheader
13
14for.cond32.preheader: ; preds = %entry, %for.body50.7
15%i.13 = phi i32 [ 0, %entry ], [ %inc60, %for.body50.7 ]
16%add = add i32 %i.13, 2
17%div44 = udiv i32 undef, %add
18%sub45 = sub i32 16384, %div44
19%conv46 = trunc i32 %sub45 to i16
20br label %for.body35
21
22for.body35: ; preds = %for.cond32.preheader
23br label %for.body50
24
25for.body50: ; preds = %for.body35
26br label %for.body50.1
27
28for.cond62: ; preds = %for.body50.7
29%conv46.lcssa = phi i16 [ %conv46, %for.body50.7 ]
30store i16 %conv46.lcssa, ptr undef, align 2
31br label %for.end83
32
33for.end83: ; preds = %for.cond62
34ret void
35
36for.body50.1: ; preds = %for.body50
37br label %for.body50.2
38
39for.body50.2: ; preds = %for.body50.1
40br label %for.body50.3
41
42for.body50.3: ; preds = %for.body50.2
43br label %for.body50.4
44
45for.body50.4: ; preds = %for.body50.3
46br label %for.body50.5
47
48for.body50.5: ; preds = %for.body50.4
49br label %for.body50.6
50
51for.body50.6: ; preds = %for.body50.5
52br label %for.body50.7
53
54for.body50.7: ; preds = %for.body50.6
55%inc60 = add i32 %i.13, 1
56%cmp29 = icmp ult i32 %inc60, 128
57br i1 %cmp29, label %for.cond32.preheader, label %for.cond62
58}
59