1 ; RUN: opt %loadPolly -polly-print-detect -disable-output < %s | FileCheck %s
2 ; RUN: opt %loadPolly -polly-codegen -verify-region-info -disable-output < %s
4 ; This is a scop directly precedented by a region, i.e. the scop's entry is the
5 ; region's exit block. This test is to ensure that the RegionInfo is correctly
8 ; CHECK: Valid Region for Scop: region2 => return
10 define void @f1(ptr %A, i64 %N) nounwind {
15 %indvar1 = phi i64 [ 0, %entry ], [ %indvar1.next, %region1 ]
17 %indvar1.next = add nsw i64 %indvar1, 1
18 %exitcond1 = icmp eq i64 %indvar1.next, %N
19 br i1 %exitcond1, label %region2, label %region1
22 %indvar2 = phi i64 [ 0, %region1 ], [ %indvar2.next, %region2 ]
23 %scevgep2 = getelementptr i64, ptr %A, i64 %indvar2
24 store i64 %indvar2, ptr %scevgep2
25 %indvar2.next = add nsw i64 %indvar2, 1
26 %exitcond2 = icmp eq i64 %indvar2.next, %N
27 br i1 %exitcond2, label %return, label %region2