1 ; RUN: opt %loadNPMPolly -passes=polly-codegen -S < %s | FileCheck %s
3 ; Verify we do not crash when we synthezise code for the udiv in the SCoP.
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 ; Function Attrs: nounwind uwtable
10 define void @RestartModel() #0 {
12 br label %for.cond32.preheader
14 for.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
22 for.body35: ; preds = %for.cond32.preheader
25 for.body50: ; preds = %for.body35
26 br label %for.body50.1
28 for.cond62: ; preds = %for.body50.7
29 %conv46.lcssa = phi i16 [ %conv46, %for.body50.7 ]
30 store i16 %conv46.lcssa, ptr undef, align 2
33 for.end83: ; preds = %for.cond62
36 for.body50.1: ; preds = %for.body50
37 br label %for.body50.2
39 for.body50.2: ; preds = %for.body50.1
40 br label %for.body50.3
42 for.body50.3: ; preds = %for.body50.2
43 br label %for.body50.4
45 for.body50.4: ; preds = %for.body50.3
46 br label %for.body50.5
48 for.body50.5: ; preds = %for.body50.4
49 br label %for.body50.6
51 for.body50.6: ; preds = %for.body50.5
52 br label %for.body50.7
54 for.body50.7: ; preds = %for.body50.6
55 %inc60 = add i32 %i.13, 1
56 %cmp29 = icmp ult i32 %inc60, 128
57 br i1 %cmp29, label %for.cond32.preheader, label %for.cond62