1 ; RUN: opt %loadPolly -polly-opt-isl -polly-opt-max-coefficient=-1 -polly-parallel -polly-codegen -S < %s | FileCheck %s
3 ; Check that we do not crash but generate parallel code
5 ; CHECK: polly.par.setup
7 ; ModuleID = 'bugpoint-reduced-simplified.bc'
8 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10 ; Function Attrs: nounwind uwtable
11 define void @III_hybrid(ptr %tsOut) #0 {
15 if.end: ; preds = %entry
16 br i1 undef, label %for.body42, label %for.cond66.preheader
18 for.cond39.for.cond66.preheader.loopexit67_crit_edge: ; preds = %for.body42
19 %add.ptr62.lcssa = phi ptr [ undef, %for.body42 ]
20 br label %for.cond66.preheader
22 for.cond66.preheader: ; preds = %for.cond39.for.cond66.preheader.loopexit67_crit_edge, %if.end
23 %rawout1.3.ph = phi ptr [ %add.ptr62.lcssa, %for.cond39.for.cond66.preheader.loopexit67_crit_edge ], [ undef, %if.end ]
24 %sb.3.ph = phi i32 [ 0, %for.cond39.for.cond66.preheader.loopexit67_crit_edge ], [ 0, %if.end ]
25 %tspnt.3.ph = phi ptr [ undef, %for.cond39.for.cond66.preheader.loopexit67_crit_edge ], [ %tsOut, %if.end ]
26 br label %for.cond69.preheader
28 for.body42: ; preds = %if.end
29 br label %for.cond39.for.cond66.preheader.loopexit67_crit_edge
31 for.cond69.preheader: ; preds = %for.end76, %for.cond66.preheader
32 %tspnt.375 = phi ptr [ %incdec.ptr79, %for.end76 ], [ %tspnt.3.ph, %for.cond66.preheader ]
33 %sb.374 = phi i32 [ %inc78, %for.end76 ], [ %sb.3.ph, %for.cond66.preheader ]
34 %rawout1.373 = phi ptr [ undef, %for.end76 ], [ %rawout1.3.ph, %for.cond66.preheader ]
37 for.body71: ; preds = %for.body71, %for.cond69.preheader
38 %indvars.iv = phi i64 [ 0, %for.cond69.preheader ], [ %indvars.iv.next, %for.body71 ]
39 %rawout1.469 = phi ptr [ %rawout1.373, %for.cond69.preheader ], [ undef, %for.body71 ]
40 %0 = load i64, ptr %rawout1.469, align 8
41 %1 = shl nsw i64 %indvars.iv, 5
42 %arrayidx73 = getelementptr inbounds double, ptr %tspnt.375, i64 %1
43 store i64 %0, ptr %arrayidx73, align 8
44 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
45 %exitcond = icmp ne i64 %indvars.iv.next, 18
46 br i1 %exitcond, label %for.body71, label %for.end76
48 for.end76: ; preds = %for.body71
49 %inc78 = add nsw i32 %sb.374, 1
50 %incdec.ptr79 = getelementptr inbounds double, ptr %tspnt.375, i64 1
51 %exitcond95 = icmp ne i32 %inc78, 32
52 br i1 %exitcond95, label %for.cond69.preheader, label %for.end80
54 for.end80: ; preds = %for.end76