1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[NewPM] Pin -lazy-branch-prob and -lazy-block-freq tests to legacy PM

NPM passes just use the normal versions of these analyses instead.
Also pin any tests with -analyze to legacy PM.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D87857
This commit is contained in:
Arthur Eubanks 2020-09-17 13:51:01 -07:00
parent adddf2a5ad
commit c5c94111c8
24 changed files with 35 additions and 33 deletions

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
declare void @g(i32 %x)

View File

@ -1,5 +1,5 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -lazy-block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -analyze -lazy-block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
define i32 @test1(i32 %i, i32* %a) {

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
define void @double_backedge(i1 %x) {

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
; CHECK-LABEL: Printing analysis {{.*}} for function 'double_exit':

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
; PR21622: Check for a crasher when the sum of exits to the same successor of a

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
; A loop with multiple exits isn't irreducible. It should be handled

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0
; RUN: opt < %s -passes='print<block-freq>' -disable-output
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
; Function Attrs: noinline norecurse nounwind readnone uwtable

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
; CHECK-LABEL: Printing analysis {{.*}} for function 'loop_with_branch':

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
; CHECK-LABEL: Printing analysis {{.*}} for function 'loop_with_invoke':

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
; This code contains three loops. One is triple-nested, the

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
; CHECK-LABEL: Printing analysis {{.*}} for function 'nested_loop_with_branches'

View File

@ -1,5 +1,5 @@
; RUN: opt < %s -analyze -block-freq | FileCheck %s
; RUN: opt < %s -analyze -lazy-block-freq | FileCheck %s
; RUN: opt < %s -analyze -block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -analyze -lazy-block-freq -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<block-freq>' -disable-output 2>&1 | FileCheck %s
define void @test1() {

View File

@ -1,5 +1,5 @@
; RUN: opt < %s -analyze -branch-prob | FileCheck %s
; RUN: opt < %s -analyze -lazy-branch-prob | FileCheck %s
; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -analyze -lazy-branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
define i32 @test1(i32 %i, i32* %a) {

View File

@ -1,4 +1,4 @@
; RUN: opt -analyze -branch-prob < %s | FileCheck %s
; RUN: opt -analyze -branch-prob < %s -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
declare i32 @llvm.experimental.deoptimize.i32(...)

View File

@ -1,8 +1,9 @@
; RUN: opt < %s -analyze -branch-prob | FileCheck %s
; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
; This function tests the floating point unorder comparison. The probability
; of NaN should be extremely small.
; CHECK: Printing analysis 'Branch Probability Analysis' for function 'uno'
; CHECK: Printing analysis {{.*}} for function 'uno'
; CHECK: edge -> a probability is 0x00000800 / 0x80000000 = 0.00%
; CHECK: edge -> b probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
@ -20,7 +21,7 @@ b:
}
; This function tests the floating point order comparison.
; CHECK: Printing analysis 'Branch Probability Analysis' for function 'ord'
; CHECK: Printing analysis {{.*}} for function 'ord'
; CHECK: edge -> a probability is 0x7ffff800 / 0x80000000 = 100.00% [HOT edge]
; CHECK: edge -> b probability is 0x00000800 / 0x80000000 = 0.00%

View File

@ -1,5 +1,5 @@
; RUN: opt < %s -analyze -branch-prob | FileCheck %s
; RUN: opt < %s -analyze -lazy-branch-prob | FileCheck %s
; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -analyze -lazy-branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
declare i32 @strcmp(i8*, i8*)
@ -353,4 +353,4 @@ else:
exit:
%result = phi i32 [ 0, %then ], [ 1, %else ]
ret i32 %result
}
}

View File

@ -1,5 +1,5 @@
; Test the static branch probability heuristics for no-return functions.
; RUN: opt < %s -analyze -branch-prob | FileCheck %s
; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<branch-prob>' --disable-output 2>&1 | FileCheck %s
declare void @g1()

View File

@ -1,5 +1,5 @@
; Test the static branch probability heuristics for no-return functions.
; RUN: opt < %s -analyze -branch-prob | FileCheck %s
; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
declare void @abort() noreturn

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -branch-prob | FileCheck %s
; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
; Since neither of while.body's out-edges is an exit or a back edge,

View File

@ -1,4 +1,4 @@
; RUN: opt < %s -analyze -branch-prob | FileCheck %s
; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
; In this test, the else clause is taken about 90% of the time. This was not

View File

@ -1,5 +1,5 @@
; RUN: opt < %s -analyze -branch-prob | FileCheck %s
; RUN: opt < %s -analyze -lazy-branch-prob | FileCheck %s
; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -analyze -lazy-branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
declare void @g(i32)

View File

@ -1,4 +1,5 @@
; RUN: opt < %s -analyze -branch-prob | FileCheck %s
; RUN: opt < %s -analyze -branch-prob -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='print<branch-prob>' -disable-output 2>&1 | FileCheck %s
@A = global i32 0, align 4
@B = global i32 0, align 4

View File

@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -loop-sink -break-crit-edges -branch-prob -S | FileCheck %s
; RUN: opt < %s -loop-sink -break-crit-edges -lazy-block-freq -S | FileCheck %s
; RUN: opt < %s -loop-sink -break-crit-edges -lazy-branch-prob -S | FileCheck %s
; RUN: opt < %s -loop-sink -break-crit-edges -lazy-block-freq -S -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -loop-sink -break-crit-edges -lazy-branch-prob -S -enable-new-pm=0 | FileCheck %s
; BreakCriticalEdges tries to update LI and DT if they are present. However,
; updating LI actually needs a DT, so we now require DT in