llvm.org GIT mirror llvm / e39a2ba
New Test-Case for Region Analysis While working on improvements to region info analysis, this test case caused an incorrect region bb2 => bb3 to be detected. Reviewers: grosser Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in> Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30652 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297014 91177308-0d34-0410-b5e6-96231b3b80d8 Tobias Grosser 3 years ago
1 changed file(s) with 39 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; REQUIRES: asserts
1 ; RUN: opt -regions -analyze < %s | FileCheck %s
2 ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s
3
4 ; While working on improvements to region info analysis, this test
5 ; case caused an incorrect region bb2 => bb3 to be detected.
6
7 define internal i8 @main_read() nounwind {
8 bb:
9 br label %bb1
10
11 bb1:
12 br i1 true, label %bb2, label %bb7
13
14 bb2:
15 br i1 true, label %bb4, label %bb3
16
17 bb3:
18 br i1 true, label %bb4, label %bb8
19
20 bb4:
21 br label %bb5
22
23 bb5:
24 br label %bb6
25
26 bb6:
27 br label %bb1
28
29 bb7:
30 br label %bb5
31
32 bb8:
33 ret i8 1
34 }
35
36 ; CHECK: [0] bb =>
37 ; CHECK-NEXT: [1] bb1 => bb8
38 ; CHECK-NEXT: End Region tree