[llvm] 7e9411e - [NPM][PFOProfile] Fix some tests under NPM

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 22:06:39 PDT 2020


Author: Arthur Eubanks
Date: 2020-10-19T22:06:10-07:00
New Revision: 7e9411efcf09e31d2db9e82dde378e40c908fc82

URL: https://github.com/llvm/llvm-project/commit/7e9411efcf09e31d2db9e82dde378e40c908fc82
DIFF: https://github.com/llvm/llvm-project/commit/7e9411efcf09e31d2db9e82dde378e40c908fc82.diff

LOG: [NPM][PFOProfile] Fix some tests under NPM

Added: 
    

Modified: 
    llvm/test/Transforms/PGOProfile/chr.ll
    llvm/test/Transforms/PGOProfile/indirectbr.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/PGOProfile/chr.ll b/llvm/test/Transforms/PGOProfile/chr.ll
index 1a22d7f0b849..0390b8eeee7d 100644
--- a/llvm/test/Transforms/PGOProfile/chr.ll
+++ b/llvm/test/Transforms/PGOProfile/chr.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -chr -instcombine -simplifycfg -S | FileCheck %s
+; RUN: opt < %s -chr -instcombine -simplifycfg -S -enable-new-pm=0 | FileCheck %s
 ; RUN: opt < %s -passes='require<profile-summary>,function(chr,instcombine,simplify-cfg)' -S | FileCheck %s
 
 declare void @foo()

diff  --git a/llvm/test/Transforms/PGOProfile/indirectbr.ll b/llvm/test/Transforms/PGOProfile/indirectbr.ll
index 978b1ec5d760..ab4c52decf5f 100644
--- a/llvm/test/Transforms/PGOProfile/indirectbr.ll
+++ b/llvm/test/Transforms/PGOProfile/indirectbr.ll
@@ -1,13 +1,13 @@
 ; RUN: llvm-profdata merge %S/Inputs/indirectbr.proftext -o %t.profdata
-; RUN: opt < %s -pgo-instr-use -pgo-instrument-entry=false -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
+; RUN: opt < %s -pgo-instr-use -pgo-instrument-entry=false -pgo-test-profile-file=%t.profdata -S -enable-new-pm=0 | FileCheck %s --check-prefix=USE
 ; New PM
 ; RUN: opt < %s -passes=pgo-instr-use -pgo-instrument-entry=false -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
-; RUN: opt < %s -passes=pgo-instr-use -pgo-instrument-entry=false -pgo-test-profile-file=%t.profdata -S | opt -S -analyze -branch-prob | FileCheck %s --check-prefix=BRANCHPROB
+; RUN: opt < %s -passes=pgo-instr-use -pgo-instrument-entry=false -pgo-test-profile-file=%t.profdata -S | opt -S -passes='print<branch-prob>' 2>&1 | FileCheck %s --check-prefix=BRANCHPROB
 ; RUN: llvm-profdata merge %S/Inputs/indirectbr_entry.proftext -o %t2.profdata
-; RUN: opt < %s -pgo-instr-use -pgo-instrument-entry=true -pgo-test-profile-file=%t2.profdata -S | FileCheck %s --check-prefix=USE
+; RUN: opt < %s -pgo-instr-use -pgo-instrument-entry=true -pgo-test-profile-file=%t2.profdata -S -enable-new-pm=0 | FileCheck %s --check-prefix=USE
 ; New PM
 ; RUN: opt < %s -passes=pgo-instr-use -pgo-instrument-entry=true -pgo-test-profile-file=%t2.profdata -S | FileCheck %s --check-prefix=USE
-; RUN: opt < %s -passes=pgo-instr-use -pgo-instrument-entry=true -pgo-test-profile-file=%t2.profdata -S | opt -S -analyze -branch-prob | FileCheck %s --check-prefix=BRANCHPROB
+; RUN: opt < %s -passes=pgo-instr-use -pgo-instrument-entry=true -pgo-test-profile-file=%t2.profdata -S | opt -S -passes='print<branch-prob>' 2>&1 | FileCheck %s --check-prefix=BRANCHPROB
 
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
@@ -39,7 +39,7 @@ return:
   ret i32 %retval.0
 }
 
-; BRANCHPROB: Printing analysis 'Branch Probability Analysis' for function 'foo':
+; BRANCHPROB: Printing analysis {{.*}} for function 'foo':
 ; BRANCHPROB:---- Branch Probabilities ----
 ; BRANCHPROB:  edge entry -> if.then probability is 0x37c32b17 / 0x80000000 = 43.56%
 ; BRANCHPROB:  edge entry -> return.clone probability is 0x483cd4e9 / 0x80000000 = 56.44%


        


More information about the llvm-commits mailing list