[PATCH] D105154: [Test] fix inline_nossp.ll for OPM

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 14:58:34 PDT 2021


nickdesaulniers created this revision.
nickdesaulniers added reviewers: abhinavgaba, aeubanks.
nickdesaulniers requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This test was modified in D104958 <https://reviews.llvm.org/D104958>. Invoking opt with -{passname} (vs
-passes={passname}) without -enable-new-pm={0|1} is now ambiguous and
dependent on how LLVM was configured. Fix this test for folks still
using the OPM.

See also:
https://lists.llvm.org/pipermail/llvm-dev/2021-June/151553.html


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105154

Files:
  llvm/test/Transforms/Inline/inline_nossp.ll


Index: llvm/test/Transforms/Inline/inline_nossp.ll
===================================================================
--- llvm/test/Transforms/Inline/inline_nossp.ll
+++ llvm/test/Transforms/Inline/inline_nossp.ll
@@ -1,14 +1,17 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -inline -o - -S %s -pass-remarks-missed=inline 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-INLINE %s
-; RUN: opt -passes='cgscc(inline)' %s -S -pass-remarks-missed=inline 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-INLINE %s
-; RUN: opt -always-inline -o - -S %s | FileCheck %s
-; RUN: opt -passes=always-inline -o - -S %s | FileCheck %s
+; RUN: opt -enable-new-pm=0 -inline -o - -S %s -pass-remarks-missed=inline 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-INLINE %s
+; RUN: opt -passes='cgscc(inline)' %s -S -pass-remarks-missed=inline 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-INLINE,CHECK-NPM %s
+; RUN: opt -enable-new-pm=0 -always-inline -o - -S %s | FileCheck %s --check-prefixes=CHECK,CHECK-AI-OPM
+; RUN: opt -passes=always-inline -o - -S %s | FileCheck --check-prefixes=CHECK,CHECK-NPM %s
 
 ; CHECK-INLINE: ssp not inlined into nossp_caller because it should never be inlined (cost=never): stack protected callee but caller requested no stack protector
 ; CHECK-INLINE: nossp not inlined into ssp_caller because it should never be inlined (cost=never): stack protected caller but callee requested no stack protector
 
 ; Not interesting to test.
 define i32 @nossp() { ret i32 41 }
+; CHECK-LABEL: @nossp(
+; CHECK-NEXT:    ret i32 41
+;
 define i32 @ssp() sspstrong { ret i32 42 }
 define i32 @nossp_alwaysinline() alwaysinline { ret i32 43 }
 define i32 @ssp_alwaysinline() sspstrong alwaysinline { ret i32 44 }
@@ -17,7 +20,8 @@
 ; @ssp_alwaysinline should be inlined due to alwaysinline.
 define i32 @nossp_caller() {
 ; CHECK-LABEL: @nossp_caller(
-; CHECK-NEXT:    [[TMP1:%.*]] = call i32 @ssp()
+; CHECK-NPM-NEXT:    [[TMP1:%.*]] = call i32 @ssp()
+; CHECK-AI-OPM-NEXT: [[TMP1:%.*]] = call i32 @ssp()
 ; CHECK-NEXT:    ret i32 44
 ;
   call i32 @ssp()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105154.355375.patch
Type: text/x-patch
Size: 2100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210629/6042b531/attachment.bin>


More information about the llvm-commits mailing list