1; RUN: opt %loadPolly -analyze -polly-scops < %s | FileCheck %s
2
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.
7; XFAIL: *
8
9; CHECK: Stmt_loopA[i0] -> [0, 0, 0]
10; CHECK-DAG: Stmt_loopB[i0] -> [0, 0, 1]
11; CHECK-DAG: Stmt_bbB[] -> [1, 0, 0]
12; CHECK-DAG: Stmt_bbA[] -> [2, 0, 0]
13; CHECK-DAG: Stmt_bbMerge[]   -> [3, 0, 0]
14
15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
16
17define void @hoge(i64 %p0, i64 %p1, i64 %p2, i64 %p3, float* %A) {
18entry:
19  br label %loopA
20
21loopA:
22  %tmp4 = phi i64 [ 0, %entry ], [ 0, %loopB]
23  store float 42.0, float* %A
24  %cmp0 = icmp sle i64 %p0, 100
25  br i1 %cmp0, label %loopB, label %bbB
26
27loopB:
28  store float 42.0, float* %A
29  %cmp1 = icmp sle i64 %p1, 100
30  br i1 %cmp1, label %loopA, label %bbA
31
32bbA:
33  store float 42.0, float* %A
34  %cmpbbA = icmp sle i64 %p2, 50
35  br i1 %cmpbbA, label %bbMerge, label %exit
36
37bbB:
38  store float 42.0, float* %A
39  %cmpbbB= icmp sle i64 %p3, 200
40  br i1 %cmpbbB, label %exit, label %bbMerge
41
42bbMerge:
43  store float 42.0, float* %A
44  br label %exit
45
46exit:
47  ret void
48}
49