[llvm] 8bdb98c - [test][Inliner] Make always-inline.ll work with NPM

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 10:01:23 PDT 2020


Author: Arthur Eubanks
Date: 2020-08-27T10:00:54-07:00
New Revision: 8bdb98c781217e318f86c568139bf0b427eab7aa

URL: https://github.com/llvm/llvm-project/commit/8bdb98c781217e318f86c568139bf0b427eab7aa
DIFF: https://github.com/llvm/llvm-project/commit/8bdb98c781217e318f86c568139bf0b427eab7aa.diff

LOG: [test][Inliner] Make always-inline.ll work with NPM

The NPM doesn't support call-site alwaysinline as described in the comments.

Also make NPM runs more similar to legacy PM runs.

Reviewed By: ychen, asbirlea

Differential Revision: https://reviews.llvm.org/D86663

Added: 
    

Modified: 
    llvm/test/Transforms/Inline/always-inline.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/Inline/always-inline.ll b/llvm/test/Transforms/Inline/always-inline.ll
index 81cbb73fbf59..0fcf956199c4 100644
--- a/llvm/test/Transforms/Inline/always-inline.ll
+++ b/llvm/test/Transforms/Inline/always-inline.ll
@@ -1,15 +1,17 @@
-; RUN: opt < %s -inline-threshold=0 -always-inline -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
+; RUN: opt < %s -inline-threshold=0 -always-inline -enable-new-pm=0 -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
 ;
 ; Ensure the threshold has no impact on these decisions.
-; RUN: opt < %s -inline-threshold=20000000 -always-inline -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
-; RUN: opt < %s -inline-threshold=-20000000 -always-inline -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
+; RUN: opt < %s -inline-threshold=20000000 -always-inline -enable-new-pm=0 -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
+; RUN: opt < %s -inline-threshold=-20000000 -always-inline -enable-new-pm=0 -S | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CALL
 ;
 ; The new pass manager doesn't re-use any threshold based infrastructure for
 ; the always inliner, but test that we get the correct result. The new PM
 ; always inliner also doesn't support inlining call-site alwaysinline
 ; annotations. It isn't clear that this is a reasonable use case for
 ; 'alwaysinline'.
-; RUN: opt < %s -passes=always-inline -S | FileCheck %s --check-prefix=CHECK
+; RUN: opt < %s -inline-threshold=0 -passes=always-inline -S | FileCheck %s --check-prefix=CHECK
+; RUN: opt < %s -inline-threshold=20000000 -passes=always-inline -S | FileCheck %s --check-prefix=CHECK
+; RUN: opt < %s -inline-threshold=-20000000 -passes=always-inline -S | FileCheck %s --check-prefix=CHECK
 
 define internal i32 @inner1() alwaysinline {
 ; CHECK-NOT: @inner1(


        


More information about the llvm-commits mailing list