1; RUN: opt %loadPolly -polly-detect -analyze < %s | FileCheck %s
2; RUN: opt %loadPolly -polly-scops -analyze < %s
3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4
5; This test case contains two scops.
6define void @test(i32 %l, double* %a) {
7entry:
8  br label %entry.split
9
10entry.split:                                      ; preds = %entry
11  %shl = shl i32 %l, 2
12  br i1 false, label %for.body, label %for.end
13
14for.body:                                         ; preds = %for.body, %entry.split
15  %j.011 = phi i32 [ 0, %entry.split ], [ %add76, %for.body ]
16  %add76 = add nsw i32 %j.011, 2
17  br i1 false, label %for.body, label %for.end
18
19for.end:                                          ; preds = %for.body, %entry.split
20  br i1 undef, label %for.body81, label %for.end170
21
22for.body81:                                       ; preds = %for.body81, %for.end
23  %j.19 = phi i32 [ %shl, %for.end ], [ %add169, %for.body81 ]
24  %add13710 = or i32 %j.19, 1
25  %idxprom138 = sext i32 %add13710 to i64
26  %arrayidx139 = getelementptr inbounds double, double* %a, i64 %idxprom138
27  store double undef, double* %arrayidx139, align 8
28  %add169 = add nsw i32 %j.19, 2
29  br i1 false, label %for.body81, label %for.end170
30
31for.end170:                                       ; preds = %for.body81
32  ret void
33}
34
35; CHECK: Valid Region for Scop: entry.split => for.end
36; CHECK: Valid Region for Scop: for.body81 => for.end170
37
38