1 ; RUN: opt %loadPolly -polly-print-scops -disable-output < %s | FileCheck %s
3 ; The SCoP contains a loop with multiple exit blocks (BBs after leaving
4 ; the loop). The current implementation of deriving their domain derives
5 ; only a common domain for all of the exit blocks. We disabled loops with
6 ; multiple exit blocks until this is fixed.
9 ; void foo(long n, float A[100]) {
10 ; for (long j = 0; j < n; j++) {
11 ; for (long i = j; i < n; i++) {
26 ; CHECK: [n] -> { Stmt_if_end_7[i0, i1] : i0 >= 0 and 0 <= i1 <= 99 - i0 and i1 < n - i0 };
28 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
30 define void @foo(i64 %n, ptr %A) {
34 for.cond: ; preds = %for.inc.8, %entry
35 %j.0 = phi i64 [ 0, %entry ], [ %inc9, %for.inc.8 ]
36 %cmp = icmp slt i64 %j.0, %n
37 br i1 %cmp, label %for.body, label %for.end.10
39 for.body: ; preds = %for.cond
42 for.cond.1: ; preds = %for.inc, %for.body
43 %i.0 = phi i64 [ %j.0, %for.body ], [ %inc, %for.inc ]
44 %cmp2 = icmp slt i64 %i.0, %n
45 br i1 %cmp2, label %for.body.3, label %for.end
47 for.body.3: ; preds = %for.cond.1
48 br i1 false, label %if.then, label %if.end
50 if.then: ; preds = %for.body.3
53 if.end: ; preds = %for.body.3
54 %cmp5 = icmp sgt i64 %i.0, 99
55 br i1 %cmp5, label %if.then.6, label %if.end.7
57 if.then.6: ; preds = %if.end
60 if.end.7: ; preds = %if.end
61 %conv = sitofp i64 %i.0 to float
62 %arrayidx = getelementptr inbounds float, ptr %A, i64 %i.0
63 %tmp = load float, ptr %arrayidx, align 4
64 %add = fadd float %tmp, %conv
65 store float %add, ptr %arrayidx, align 4
68 for.inc: ; preds = %if.end.7
69 %inc = add nuw nsw i64 %i.0, 1
72 for.end: ; preds = %for.cond.1
75 for.inc.8: ; preds = %for.end
76 %inc9 = add nuw nsw i64 %j.0, 1
79 for.end.10: ; preds = %for.cond
82 end: ; preds = %for.end.10, %if.then.6, %if.then