diff --git a/llvm/test/Analysis/RegionInfo/bad_node_traversal.ll b/llvm/test/Analysis/RegionInfo/bad_node_traversal.ll index 00dd1207af9f..7e658f6bda68 100644 --- a/llvm/test/Analysis/RegionInfo/bad_node_traversal.ll +++ b/llvm/test/Analysis/RegionInfo/bad_node_traversal.ll @@ -1,43 +1,44 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s +; RUN: opt -passes='print' -disable-output < %s 2>&1 | FileCheck %s ; While working on improvements to the region info analysis, this test ; case caused an incorrect region 3 => 8 to be detected. define internal i8 @wibble() { bb: br i1 true, label %bb1, label %bb8 bb1: ; preds = %bb switch i32 0, label %bb2 [ i32 0, label %bb3 i32 1, label %bb7 ] bb2: ; preds = %bb1 br label %bb4 bb3: ; preds = %bb1 br label %bb5 bb4: ; preds = %bb2 br label %bb6 bb5: ; preds = %bb3 br label %bb6 bb6: ; preds = %bb5, %bb4 br label %bb7 bb7: ; preds = %bb6, %bb1 br label %bb8 bb8: ; preds = %bb7, %bb ret i8 1 } ; CHECK: [0] bb => ; CHECK-NEXT: [1] bb => bb8 ; CHECK-NEXT: [2] bb1 => bb7 ; CHECK-NEXT: End region tree diff --git a/llvm/test/Analysis/RegionInfo/block_sort.ll b/llvm/test/Analysis/RegionInfo/block_sort.ll index ce1a48132901..ace6849fc848 100644 --- a/llvm/test/Analysis/RegionInfo/block_sort.ll +++ b/llvm/test/Analysis/RegionInfo/block_sort.ll @@ -1,45 +1,48 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s -; RUN: opt -regions -stats -analyze < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s +; RUN: opt -regions -stats -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @BZ2_blockSort() nounwind { start: br label %while while: br label %while.body134.i.i while.body134.i.i: br i1 1, label %end, label %w w: br label %if.end140.i.i if.end140.i.i: br i1 1, label %while.end186.i.i, label %if.end183.i.i if.end183.i.i: br label %while.body134.i.i while.end186.i.i: br label %while end: ret void } ; CHECK-NOT: => ; CHECK: [0] start => ; CHECK: [1] while => end ; STAT: 2 region - The # of regions ; STAT: 1 region - The # of simple regions ; BBIT: start, while, while.body134.i.i, end, w, if.end140.i.i, while.end186.i.i, if.end183.i.i, ; BBIT: while, while.body134.i.i, w, if.end140.i.i, while.end186.i.i, if.end183.i.i, ; RNIT: start, while => end, end, ; RNIT: while, while.body134.i.i, w, if.end140.i.i, while.end186.i.i, if.end183.i.i, diff --git a/llvm/test/Analysis/RegionInfo/cond_loop.ll b/llvm/test/Analysis/RegionInfo/cond_loop.ll index 7dc311a299ce..9fb2e22b49f1 100644 --- a/llvm/test/Analysis/RegionInfo/cond_loop.ll +++ b/llvm/test/Analysis/RegionInfo/cond_loop.ll @@ -1,36 +1,39 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { "5": br label %"0" "0": br label %"1" "1": br i1 1, label %"2", label %"3" "2": ret void "3": br i1 1, label %"1", label %"4" "4": br label %"0" } ; CHECK-NOT: => ; CHECK: [0] 5 => ; CHECK: [1] 0 => 2 ; STAT: 2 region - The # of regions ; STAT: 1 region - The # of simple regions ; BBIT: 5, 0, 1, 2, 3, 4, ; BBIT: 0, 1, 3, 4, ; RNIT: 5, 0 => 2, 2, ; RNIT: 0, 1, 3, 4, diff --git a/llvm/test/Analysis/RegionInfo/condition_complicated.ll b/llvm/test/Analysis/RegionInfo/condition_complicated.ll index e700503f8a48..3c1507acf221 100644 --- a/llvm/test/Analysis/RegionInfo/condition_complicated.ll +++ b/llvm/test/Analysis/RegionInfo/condition_complicated.ll @@ -1,63 +1,66 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc zeroext i8 @handle_compress() nounwind { end165: br i1 1, label %false239, label %true181 true181: br i1 1, label %then187, label %else232 then187: br label %end265 else232: br i1 1, label %false239, label %then245 false239: br i1 1, label %then245, label %else259 then245: br i1 1, label %then251, label %end253 then251: br label %end253 end253: br label %end265 else259: br label %end265 end265: br i1 1, label %then291, label %end298 then291: br label %end298 end298: ret i8 1 } ; CHECK-NOT: => ; CHECK: [0] end165 => ; CHECK-NEXT: [1] end165 => end265 ; CHECK-NEXT: [2] then245 => end253 ; CHECK-NEXT: [1] end265 => end298 ; STAT: 4 region - The # of regions ; BBIT: end165, false239, then245, then251, end253, end265, then291, end298, else259, true181, then187, else232, ; BBIT: end165, false239, then245, then251, end253, else259, true181, then187, else232, ; BBIT: then245, then251, ; BBIT: end265, then291, ; RNIT: end165 => end265, end265 => end298, end298, ; RNIT: end165, false239, then245 => end253, end253, else259, true181, then187, else232, ; RNIT: then245, then251, ; RNIT: end265, then291, diff --git a/llvm/test/Analysis/RegionInfo/condition_complicated_2.ll b/llvm/test/Analysis/RegionInfo/condition_complicated_2.ll index 584ebba6f04b..12564b3abc4e 100644 --- a/llvm/test/Analysis/RegionInfo/condition_complicated_2.ll +++ b/llvm/test/Analysis/RegionInfo/condition_complicated_2.ll @@ -1,47 +1,50 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc void @compress() nounwind { end33: br i1 1, label %end124, label %lor.lhs.false95 lor.lhs.false95: br i1 1, label %then107, label %end172 then107: br i1 1, label %end124, label %then113 then113: br label %end124 end124: br label %exit end172: br label %exit exit: unreachable } ; CHECK-NOT: => ; CHECK: [0] end33 => ; CHECK-NEXT: [1] end33 => exit ; CHECK-NEXT: [2] then107 => end124 ; STAT: 3 region - The # of regions ; BBIT: end33, end124, exit, lor.lhs.false95, then107, then113, end172, ; BBIT: end33, end124, lor.lhs.false95, then107, then113, end172, ; BBIT: then107, then113, ; RNIT: end33 => exit, exit, ; RNIT: end33, end124, lor.lhs.false95, then107 => end124, end172, ; RNIT: then107, then113, diff --git a/llvm/test/Analysis/RegionInfo/condition_forward_edge.ll b/llvm/test/Analysis/RegionInfo/condition_forward_edge.ll index cc9a3294e145..76ae02882a03 100644 --- a/llvm/test/Analysis/RegionInfo/condition_forward_edge.ll +++ b/llvm/test/Analysis/RegionInfo/condition_forward_edge.ll @@ -1,29 +1,32 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { "0": br label %"1" "1": br i1 1, label %"2", label %"3" "2": br label %"3" "3": ret void } ; CHECK-NOT: => ; CHECK: [0] 0 => ; CHECK: [1] 1 => 3 ; STAT: 2 region - The # of regions ; BBIT: 0, 1, 2, 3, ; BBIT: 1, 2, ; RNIT: 0, 1 => 3, 3, ; RNIT: 1, 2, diff --git a/llvm/test/Analysis/RegionInfo/condition_same_exit.ll b/llvm/test/Analysis/RegionInfo/condition_same_exit.ll index f3f443b2ba64..39787409198a 100644 --- a/llvm/test/Analysis/RegionInfo/condition_same_exit.ll +++ b/llvm/test/Analysis/RegionInfo/condition_same_exit.ll @@ -1,34 +1,37 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { "0": br i1 1, label %"1", label %"4" "1": br i1 1, label %"2", label %"3" "2": br label %"4" "3": br label %"4" "4": ret void } ; CHECK-NOT: => ; CHECK: [0] 0 => ; CHECK-NEXT: [1] 0 => 4 ; CHECK-NEXT: [2] 1 => 4 ; STAT: 3 region - The # of regions ; BBIT: 0, 1, 2, 4, 3, ; BBIT: 0, 1, 2, 3, ; BBIT: 1, 2, 3, ; RNIT: 0 => 4, 4, ; RNIT: 0, 1 => 4, ; RNIT: 1, 2, 3, diff --git a/llvm/test/Analysis/RegionInfo/condition_simple.ll b/llvm/test/Analysis/RegionInfo/condition_simple.ll index 67bdb506702e..f4456825f797 100644 --- a/llvm/test/Analysis/RegionInfo/condition_simple.ll +++ b/llvm/test/Analysis/RegionInfo/condition_simple.ll @@ -1,31 +1,34 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { "0": br label %"1" "1": br i1 1, label %"2", label %"3" "2": br label %"4" "3": br label %"4" "4": ret void } ; CHECK-NOT: => ; CHECK: [0] 0 => ; CHECK-NEXT: [1] 1 => 4 ; STAT: 2 region - The # of regions ; BBIT: 0, 1, 2, 4, 3, ; BBIT: 1, 2, 3, ; RNIT: 0, 1 => 4, 4, ; RNIT: 1, 2, 3, diff --git a/llvm/test/Analysis/RegionInfo/exit_in_condition.ll b/llvm/test/Analysis/RegionInfo/exit_in_condition.ll index 8a6d208f479e..a8c3624ff4e6 100644 --- a/llvm/test/Analysis/RegionInfo/exit_in_condition.ll +++ b/llvm/test/Analysis/RegionInfo/exit_in_condition.ll @@ -1,41 +1,44 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc zeroext i8 @handle_compress() nounwind { entry: br label %outer outer: br label %body body: br i1 1, label %body.i, label %if.end body.i: br i1 1, label %end, label %if.end if.end: br label %if.then64 if.then64: br label %outer end: ret i8 1 } ; CHECK-NOT: => ; CHECK: [0] entry => ; CHECK-NEXT: [1] outer => end ; STAT: 2 region - The # of regions ; STAT: 1 region - The # of simple regions ; BBIT: entry, outer, body, body.i, end, if.end, if.then64, ; BBIT: outer, body, body.i, if.end, if.then64, ; RNIT: entry, outer => end, end, ; RNIT: outer, body, body.i, if.end, if.then64, diff --git a/llvm/test/Analysis/RegionInfo/infinite_loop.ll b/llvm/test/Analysis/RegionInfo/infinite_loop.ll index 35c82ce8e041..f27bb1a461f6 100644 --- a/llvm/test/Analysis/RegionInfo/infinite_loop.ll +++ b/llvm/test/Analysis/RegionInfo/infinite_loop.ll @@ -1,19 +1,20 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s +; RUN: opt -passes='print' -disable-output < %s 2>&1 ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s define void @normal_condition() nounwind { 0: br label %1 1: br i1 1, label %2, label %3 2: br label %2 3: br label %4 4: ret void } ; CHECK-NOT: => ; CHECK: [0] 0 => ; STAT: 1 region - The # of regions diff --git a/llvm/test/Analysis/RegionInfo/infinite_loop_2.ll b/llvm/test/Analysis/RegionInfo/infinite_loop_2.ll index 76ecdd833c42..8c2cf2578b06 100644 --- a/llvm/test/Analysis/RegionInfo/infinite_loop_2.ll +++ b/llvm/test/Analysis/RegionInfo/infinite_loop_2.ll @@ -1,34 +1,38 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -passes='print' -disable-output < %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { "0": br label %"1" "1": br i1 1, label %"2", label %"3" "2": br label %"5" "5": br i1 1, label %"11", label %"12" "11": br label %"6" "12": br label %"6" "6": br label %"2" "3": br label %"4" "4": ret void } ; CHECK-NOT: => ; CHECK: [0] 0 => ; CHECK-NOT: [1] ; STAT: 1 region - The # of regions ; BBIT: 0, 1, 2, 5, 11, 6, 12, 3, 4, ; RNIT: 0, 1, 2, 5, 11, 6, 12, 3, 4, diff --git a/llvm/test/Analysis/RegionInfo/infinite_loop_3.ll b/llvm/test/Analysis/RegionInfo/infinite_loop_3.ll index 2b1b643005c0..960730766cbd 100644 --- a/llvm/test/Analysis/RegionInfo/infinite_loop_3.ll +++ b/llvm/test/Analysis/RegionInfo/infinite_loop_3.ll @@ -1,47 +1,52 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s + +; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { "0": br label %"7" "7": br i1 1, label %"1", label %"8" "1": br i1 1, label %"2", label %"3" "2": br label %"5" "5": br i1 1, label %"11", label %"12" "11": br label %"6" "12": br label %"6" "6": br label %"2" "8": br label %"9" "9": br i1 1, label %"13", label %"14" "13": br label %"10" "14": br label %"10" "10": br label %"8" "3": br label %"4" "4": ret void } ; CHECK-NOT: => ; CHECK:[0] 0 => ; CHECK-NOT: [1] ; STAT: 1 region - The # of regions ; BBIT: 0, 7, 1, 2, 5, 11, 6, 12, 3, 4, 8, 9, 13, 10, 14, ; RNIT: 0, 7, 1, 2, 5, 11, 6, 12, 3, 4, 8, 9, 13, 10, 14, diff --git a/llvm/test/Analysis/RegionInfo/infinite_loop_4.ll b/llvm/test/Analysis/RegionInfo/infinite_loop_4.ll index c3ad028b0e55..8ff8e5778373 100644 --- a/llvm/test/Analysis/RegionInfo/infinite_loop_4.ll +++ b/llvm/test/Analysis/RegionInfo/infinite_loop_4.ll @@ -1,51 +1,56 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s + +; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { "0": br label %"7" "7": br i1 1, label %"1", label %"8" "1": br i1 1, label %"2", label %"3" "2": br label %"5" "5": br i1 1, label %"11", label %"12" "11": br label %"6" "12": br label %"6" "6": br i1 1, label %"2", label %"10" "8": br label %"9" "9": br i1 1, label %"13", label %"14" "13": br label %"10" "14": br label %"10" "10": br label %"8" "3": br label %"4" "4": ret void } ; CHECK-NOT: => ; CHECK: [0] 0 => ; CHECK-NEXT: [1] 2 => 10 ; CHECK_NEXT: [2] 5 => 6 ; STAT: 3 region - The # of regions ; STAT: 1 region - The # of simple regions ; BBIT: 0, 7, 1, 2, 5, 11, 6, 10, 8, 9, 13, 14, 12, 3, 4, ; BBIT: 2, 5, 11, 6, 12, ; BBIT: 5, 11, 12, ; RNIT: 0, 7, 1, 2 => 10, 10, 8, 9, 13, 14, 3, 4, ; RNIT: 2, 5 => 6, 6, ; RNIT: 5, 11, 12, diff --git a/llvm/test/Analysis/RegionInfo/infinite_loop_5_a.ll b/llvm/test/Analysis/RegionInfo/infinite_loop_5_a.ll index bf56add87ac1..76f7b247c966 100644 --- a/llvm/test/Analysis/RegionInfo/infinite_loop_5_a.ll +++ b/llvm/test/Analysis/RegionInfo/infinite_loop_5_a.ll @@ -1,22 +1,23 @@ -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s +; RUN: opt -passes='print' -disable-output < %s 2>&1 | FileCheck %s define void @normal_condition() nounwind { "0": br label %"7" "7": br i1 1, label %"1", label %"8" "1": br i1 1, label %"6", label %"3" "6": br label %"8" "8": br label %"8" "3": br label %"4" "4": ret void } ; CHECK: Region tree: ; CHECK-NEXT: [0] 0 => ; CHECK-NEXT: End region tree diff --git a/llvm/test/Analysis/RegionInfo/infinite_loop_5_b.ll b/llvm/test/Analysis/RegionInfo/infinite_loop_5_b.ll index d8602054cd00..9a5ff40cecc4 100644 --- a/llvm/test/Analysis/RegionInfo/infinite_loop_5_b.ll +++ b/llvm/test/Analysis/RegionInfo/infinite_loop_5_b.ll @@ -1,24 +1,25 @@ -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s +; RUN: opt -passes='print' -disable-output < %s 2>&1 | FileCheck %s define void @normal_condition() nounwind { "0": br label %"7" "7": br i1 1, label %"1", label %"9" "9": br label %"8" "1": br i1 1, label %"6", label %"3" "6": br label %"9" "8": br label %"8" "3": br label %"4" "4": ret void } ; CHECK: Region tree: ; CHECK-NEXT: [0] 0 => ; CHECK-NEXT: End region tree diff --git a/llvm/test/Analysis/RegionInfo/infinite_loop_5_c.ll b/llvm/test/Analysis/RegionInfo/infinite_loop_5_c.ll index 0508d0a45bda..fe2c29a72613 100644 --- a/llvm/test/Analysis/RegionInfo/infinite_loop_5_c.ll +++ b/llvm/test/Analysis/RegionInfo/infinite_loop_5_c.ll @@ -1,22 +1,23 @@ -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s +; RUN: opt -passes='print' -disable-output < %s 2>&1 | FileCheck %s define void @normal_condition() nounwind { "0": br label %"7" "7": br i1 1, label %"1", label %"8" "1": br i1 1, label %"6", label %"3" "6": br label %"8" "8": br i1 1, label %"8", label %"7" "3": br label %"4" "4": ret void } ; CHECK: [0] 0 => ; CHECK-NEXT: [1] 7 => 3 ; CHECK-NEXT: [2] 8 => 7 diff --git a/llvm/test/Analysis/RegionInfo/loop_with_condition.ll b/llvm/test/Analysis/RegionInfo/loop_with_condition.ll index 244f253d25df..1965fed8ee2a 100644 --- a/llvm/test/Analysis/RegionInfo/loop_with_condition.ll +++ b/llvm/test/Analysis/RegionInfo/loop_with_condition.ll @@ -1,49 +1,52 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition() nounwind { "0": br label %"1" "1": br i1 1, label %"6", label %"2" "2": br i1 1, label %"3", label %"4" "3": br label %"5" "4": br label %"5" "5": br label %"8" "8": br i1 1, label %"7", label %"9" "9": br label %"2" "7": br label %"6" "6": ret void } ; CHECK-NOT: => ; CHECK: [0] 0 => ; CHECK-NEXT: [1] 1 => 6 ; CHECK-NEXT: [2] 2 => 7 ; CHECK-NEXT: [3] 2 => 5 ; STAT: 4 region - The # of regions ; STAT: 1 region - The # of simple regions ; BBIT: 0, 1, 6, 2, 3, 5, 8, 7, 9, 4, ; BBIT: 1, 2, 3, 5, 8, 7, 9, 4, ; BBIT: 2, 3, 5, 8, 9, 4, ; BBIT: 2, 3, 4, ; RNIT: 0, 1 => 6, 6, ; RNIT: 1, 2 => 7, 7, ; RNIT: 2 => 5, 5, 8, 9, ; RNIT: 2, 3, 4, diff --git a/llvm/test/Analysis/RegionInfo/loops_1.ll b/llvm/test/Analysis/RegionInfo/loops_1.ll index 91023198ea29..39f59bf19714 100644 --- a/llvm/test/Analysis/RegionInfo/loops_1.ll +++ b/llvm/test/Analysis/RegionInfo/loops_1.ll @@ -1,43 +1,46 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc zeroext i8 @loops_1() nounwind { entry: br i1 1, label %outer , label %a a: br label %body outer: br label %body body: br i1 1, label %land, label %if land: br i1 1, label %exit, label %end exit: br i1 1, label %if, label %end if: br label %outer end: ret i8 1 } ; CHECK-NOT: => ; CHECK: [0] entry => ; CHECK-NEXT: [1] entry => end ; STAT: 2 region - The # of regions ; BBIT: entry, outer, body, land, exit, if, end, a, ; BBIT: entry, outer, body, land, exit, if, a, ; RNIT: entry => end, end, ; RNIT: entry, outer, body, land, exit, if, a, diff --git a/llvm/test/Analysis/RegionInfo/loops_2.ll b/llvm/test/Analysis/RegionInfo/loops_2.ll index 80cd34251d7e..397397338176 100644 --- a/llvm/test/Analysis/RegionInfo/loops_2.ll +++ b/llvm/test/Analysis/RegionInfo/loops_2.ll @@ -1,52 +1,55 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @meread_() nounwind { entry: br label %bb23 bb23: br label %bb.i bb.i: ; preds = %bb.i, %bb54 br label %pflini_.exit pflini_.exit: ; preds = %bb.i br label %bb58thread-split bb58thread-split: ; preds = %bb64, %bb61, %pflini_.exit br label %bb58 bb58: ; preds = %bb60, %bb58thread-split br i1 1, label %bb59, label %bb23 bb59: ; preds = %bb58 switch i32 1, label %bb60 [ i32 1, label %l98 ] bb60: ; preds = %bb59 br i1 1, label %bb61, label %bb58 bb61: ; preds = %bb60 br label %bb58thread-split l98: ; preds = %bb69, %bb59 ret void } ; CHECK-NOT: => ; CHECK: [0] entry => ; CHECK: [1] bb23 => l98 ; STAT: 2 region - The # of regions ; STAT: 1 region - The # of simple regions ; BBIT: entry, bb23, bb.i, pflini_.exit, bb58thread-split, bb58, bb59, bb60, bb61, l98, ; BBIT: bb23, bb.i, pflini_.exit, bb58thread-split, bb58, bb59, bb60, bb61, ; RNIT: entry, bb23 => l98, l98, ; RNIT: bb23, bb.i, pflini_.exit, bb58thread-split, bb58, bb59, bb60, bb61, diff --git a/llvm/test/Analysis/RegionInfo/mix_1.ll b/llvm/test/Analysis/RegionInfo/mix_1.ll index a462119575a7..7637f59d1375 100644 --- a/llvm/test/Analysis/RegionInfo/mix_1.ll +++ b/llvm/test/Analysis/RegionInfo/mix_1.ll @@ -1,72 +1,75 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @a_linear_impl_fig_1() nounwind { "0": br i1 1, label %"1", label %"15" "1": switch i32 0, label %"2" [ i32 0, label %"3" i32 1, label %"7"] "2": br label %"4" "3": br label %"5" "4": br label %"6" "5": br label %"6" "6": br label %"7" "7": br label %"15" "15": br label %"8" "8": br label %"16" "16": br label %"9" "9": br i1 1, label %"10", label %"11" "11": br i1 1, label %"13", label %"12" "13": br label %"14" "12": br label %"14" "14": br label %"8" "10": br label %"17" "17": br label %"18" "18": ret void } ; CHECK-NOT: => ; CHECK: [0] 0 => ; CHECK-NEXT: [1] 0 => 15 ; CHECK-NEXT: [2] 1 => 7 ; CHECK-NEXT: [1] 8 => 10 ; CHECK-NEXT: [2] 11 => 14 ; STAT: 5 region - The # of regions ; STAT: 1 region - The # of simple regions ; BBIT: 0, 1, 2, 4, 6, 7, 15, 8, 16, 9, 10, 17, 18, 11, 13, 14, 12, 3, 5, ; BBIT: 0, 1, 2, 4, 6, 7, 3, 5, ; BBIT: 1, 2, 4, 6, 3, 5, ; BBIT: 8, 16, 9, 11, 13, 14, 12, ; BBIT: 11, 13, 12, ; RNIT: 0 => 15, 15, 8 => 10, 10, 17, 18, ; RNIT: 0, 1 => 7, 7, ; RNIT: 1, 2, 4, 6, 3, 5, ; RNIT: 8, 16, 9, 11 => 14, 14, ; RNIT: 11, 13, 12, diff --git a/llvm/test/Analysis/RegionInfo/multiple_exiting_edge.ll b/llvm/test/Analysis/RegionInfo/multiple_exiting_edge.ll index 8de647229942..0c3860ca3df9 100644 --- a/llvm/test/Analysis/RegionInfo/multiple_exiting_edge.ll +++ b/llvm/test/Analysis/RegionInfo/multiple_exiting_edge.ll @@ -1,38 +1,40 @@ -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -passes='print' -print-region-style=bb -disable-output < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn -disable-output < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @normal_condition_0() nounwind { bb38: ; preds = %bb34, %bb34, %bb37 switch i32 undef, label %bb42 [ i32 67, label %bb42 i32 90, label %bb41 ] bb41: ; preds = %bb38 br label %bb42 bb42: ; preds = %bb38, %bb38, %bb41 ret void } ; BBIT: bb38, bb42, bb41, ; BBIT: bb38, bb41, ; RNIT: bb38 => bb42, bb42, ; RNIT: bb38, bb41, define void @normal_condition_1() nounwind { bb38: ; preds = %bb34, %bb34, %bb37 switch i32 undef, label %bb41 [ i32 67, label %bb42 i32 90, label %bb42 ] bb41: ; preds = %bb38 br label %bb42 bb42: ; preds = %bb38, %bb38, %bb41 ret void } ; BBIT: bb38, bb41, bb42, ; BBIT: bb38, bb41, ; RNIT: bb38 => bb42, bb42, ; RNIT: bb38, bb41, diff --git a/llvm/test/Analysis/RegionInfo/nested_loops.ll b/llvm/test/Analysis/RegionInfo/nested_loops.ll index 5d47d792cd92..980b52460ad4 100644 --- a/llvm/test/Analysis/RegionInfo/nested_loops.ll +++ b/llvm/test/Analysis/RegionInfo/nested_loops.ll @@ -1,36 +1,39 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc zeroext i8 @handle_compress() nounwind { entry: br label %outer outer: br label %body body: br i1 1, label %exit172, label %end exit172: br i1 1, label %end, label %outer end: ret i8 1 } ; CHECK-NOT: => ; CHECK: [0] entry => ; CHECK-NEXT: [1] outer => end ; STAT: 2 region - The # of regions ; BBIT: entry, outer, body, exit172, end, ; BBIT: outer, body, exit172, ; RNIT: entry, outer => end, end, ; RNIT: outer, body, exit172, diff --git a/llvm/test/Analysis/RegionInfo/next.ll b/llvm/test/Analysis/RegionInfo/next.ll index 03aa53e59a49..5976ecadad22 100644 --- a/llvm/test/Analysis/RegionInfo/next.ll +++ b/llvm/test/Analysis/RegionInfo/next.ll @@ -1,52 +1,55 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt -passes='print' -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @MAIN__() nounwind { entry: br label %__label_002001.outer __label_002001.outer: ; preds = %bb236, %bb92 br label %__label_002001 __label_002001: ; preds = %bb229, %__label_002001.outer br i1 1, label %bb93, label %__label_000020 bb93: ; preds = %__label_002001 br i1 1, label %__label_000020, label %bb197 bb197: ; preds = %bb193 br i1 1, label %bb229, label %bb224 bb224: ; preds = %bb223, %bb227 br i1 1, label %bb229, label %bb224 bb229: ; preds = %bb227, %bb223 br i1 1, label %__label_002001, label %__label_002001.outer __label_000020: ; preds = %__label_002001, %bb194 ret void } ; CHECK-NOT: => ; CHECK: [0] entry => ; CHECK-NEXT: [1] __label_002001.outer => __label_000020 ; CHECK-NEXT: [2] bb197 => bb229 ; CHECK-NEXT: [3] bb224 => bb229 ; STAT: 4 region - The # of regions ; STAT: 1 region - The # of simple regions ; BBIT: entry, __label_002001.outer, __label_002001, bb93, __label_000020, bb197, bb229, bb224, ; BBIT: __label_002001.outer, __label_002001, bb93, bb197, bb229, bb224, ; BBIT: bb197, bb224, ; BBIT: bb224, ; RNIT: entry, __label_002001.outer => __label_000020, __label_000020, ; RNIT: __label_002001.outer, __label_002001, bb93, bb197 => bb229, bb229, ; RNIT: bb197, bb224 => bb229, ; RNIT: bb224, diff --git a/llvm/test/Analysis/RegionInfo/outgoing_edge.ll b/llvm/test/Analysis/RegionInfo/outgoing_edge.ll index 39e1a39d7e5b..db4932f831c6 100644 --- a/llvm/test/Analysis/RegionInfo/outgoing_edge.ll +++ b/llvm/test/Analysis/RegionInfo/outgoing_edge.ll @@ -1,33 +1,33 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s ; While working on improvements to the region info analysis, this test ; case caused an incorrect region bb2 => bb3 to be detected. It is incorrect ; because bb2 has an outgoing edge to bb4. This is interesting because ; bb2 dom bb3 and bb3 pdom bb2, which should have been enough to prevent incoming ; forward edges into the region and outgoing forward edges from the region. define void @meread_() nounwind { bb: br label %bb1 bb1: ; preds = %bb4, %bb br label %bb2 bb2: ; preds = %bb1 br i1 true, label %bb3, label %bb4 bb3: ; preds = %bb2 br i1 true, label %bb4, label %bb5 bb4: ; preds = %bb3, %bb2 br label %bb1 bb5: ; preds = %bb3 ret void } ; CHECK: [0] bb => ; CHECK-NEXT: [1] bb1 => bb5 ; CHECK-NEXT: End region tree diff --git a/llvm/test/Analysis/RegionInfo/outgoing_edge_1.ll b/llvm/test/Analysis/RegionInfo/outgoing_edge_1.ll index 6f51131a188c..7f723cd6d4e2 100644 --- a/llvm/test/Analysis/RegionInfo/outgoing_edge_1.ll +++ b/llvm/test/Analysis/RegionInfo/outgoing_edge_1.ll @@ -1,39 +1,39 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s ; While working on improvements to region info analysis, this test ; case caused an incorrect region bb2 => bb3 to be detected. define internal i8 @main_read() nounwind { bb: br label %bb1 bb1: br i1 true, label %bb2, label %bb7 bb2: br i1 true, label %bb4, label %bb3 bb3: br i1 true, label %bb4, label %bb8 bb4: br label %bb5 bb5: br label %bb6 bb6: br label %bb1 bb7: br label %bb5 bb8: ret i8 1 } ; CHECK: [0] bb => ; CHECK-NEXT: [1] bb1 => bb8 ; CHECK-NEXT: End region tree diff --git a/llvm/test/Analysis/RegionInfo/paper.ll b/llvm/test/Analysis/RegionInfo/paper.ll index bc0fb18a0e27..31ce58dc7d8c 100644 --- a/llvm/test/Analysis/RegionInfo/paper.ll +++ b/llvm/test/Analysis/RegionInfo/paper.ll @@ -1,58 +1,61 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define void @a_linear_impl_fig_1() nounwind { "0": br label %"1" "1": br label %"2" "2": br label %"3" "3": br i1 1, label %"13", label %"4" "4": br i1 1, label %"5", label %"1" "5": br i1 1, label %"8", label %"6" "6": br i1 1, label %"7", label %"4" "7": ret void "8": br i1 1, label %"9", label %"1" "9": br label %"10" "10": br i1 1, label %"12", label %"11" "11": br i1 1, label %"9", label %"8" "13": br i1 1, label %"2", label %"1" "12": switch i32 0, label %"1" [ i32 0, label %"9" i32 1, label %"8"] } ; CHECK-NOT: => ; CHECK: [0] 0 => ; CHECK-NEXT: [1] 1 => 7 ; CHECK-NEXT: [2] 1 => 4 ; CHECK-NEXT: [2] 8 => 1 ; STAT: 4 region - The # of regions ; STAT: 1 region - The # of simple regions ; BBIT: 0, 1, 2, 3, 13, 4, 5, 8, 9, 10, 12, 11, 6, 7, ; BBIT: 1, 2, 3, 13, 4, 5, 8, 9, 10, 12, 11, 6, ; BBIT: 1, 2, 3, 13, ; BBIT: 8, 9, 10, 12, 11, ; RNIT: 0, 1 => 7, 7, ; RNIT: 1 => 4, 4, 5, 8 => 1, 6, ; RNIT: 1, 2, 3, 13, ; RNIT: 8, 9, 10, 12, 11, diff --git a/llvm/test/Analysis/RegionInfo/two_loops_same_header.ll b/llvm/test/Analysis/RegionInfo/two_loops_same_header.ll index d230d76440f8..8c6546d2ced5 100644 --- a/llvm/test/Analysis/RegionInfo/two_loops_same_header.ll +++ b/llvm/test/Analysis/RegionInfo/two_loops_same_header.ll @@ -1,49 +1,52 @@ ; REQUIRES: asserts -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt -regions -stats -disable-output < %s 2>&1 | FileCheck -check-prefix=STAT %s -; RUN: opt -regions -print-region-style=bb -analyze < %s 2>&1 | FileCheck -check-prefix=BBIT %s -; RUN: opt -regions -print-region-style=rn -analyze < %s 2>&1 | FileCheck -check-prefix=RNIT %s +; RUN: opt -regions -print-region-style=bb -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -regions -print-region-style=rn -analyze -enable-new-pm=0 < %s 2>&1 | FileCheck -check-prefix=RNIT %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s +; RUN: opt < %s -passes='print' -stats 2>&1 | FileCheck -check-prefix=STAT %s +; RUN: opt -passes='print' -print-region-style=bb < %s 2>&1 | FileCheck -check-prefix=BBIT %s +; RUN: opt -passes='print' -print-region-style=rn < %s 2>&1 | FileCheck -check-prefix=RNIT %s define internal fastcc zeroext i8 @handle_compress() nounwind { entry: br label %outer outer: br label %body body: br i1 1, label %else, label %true77 true77: br i1 1, label %then83, label %else then83: br label %outer else: br label %else106 else106: br i1 1, label %end, label %outer end: ret i8 1 } ; CHECK-NOT: => ; CHECK: [0] entry => ; CHECK-NEXT: [1] outer => end ; CHECK-NEXT: [2] outer => else ; STAT: 3 region - The # of regions ; STAT: 1 region - The # of simple regions ; BBIT: entry, outer, body, else, else106, end, true77, then83, ; BBIT: outer, body, else, else106, true77, then83, ; BBIT: outer, body, true77, then83, ; RNIT: entry, outer => end, end, ; RNIT: outer => else, else, else106, ; RNIT: outer, body, true77, then83, diff --git a/llvm/test/Analysis/RegionInfo/unreachable_bb.ll b/llvm/test/Analysis/RegionInfo/unreachable_bb.ll index 5dd1be958e71..6268fff52269 100644 --- a/llvm/test/Analysis/RegionInfo/unreachable_bb.ll +++ b/llvm/test/Analysis/RegionInfo/unreachable_bb.ll @@ -1,30 +1,30 @@ -; RUN: opt -regions -analyze < %s | FileCheck %s +; RUN: opt -regions -analyze -enable-new-pm=0 < %s | FileCheck %s ; RUN: opt < %s -passes='print' 2>&1 | FileCheck %s ; We should not crash if there are some bbs that are not reachable. define void @f() { entry: br label %for.pre notintree: ; No predecessors! br label %ret for.pre: ; preds = %entry br label %for for: ; preds = %for.inc, %for.pre %indvar = phi i64 [ 0, %for.pre ], [ %indvar.next, %for.inc ] %exitcond = icmp ne i64 %indvar, 200 br i1 %exitcond, label %for.inc, label %ret for.inc: ; preds = %for %indvar.next = add i64 %indvar, 1 br label %for ret: ; preds = %for, %notintree ret void } ; CHECK: [0] entry => ; CHECK: [1] for => ret