[llvm] [FnSpecialization] Only accept codesize savings if strictly greater than the minimum amount (PR #164867)

Ryan Buchner via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 23 13:22:35 PDT 2025


================
@@ -1,5 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
-; RUN: opt -passes=ipsccp  --funcspec-min-function-size=1 -S < %s | FileCheck %s
+; RUN: opt -passes=ipsccp  --funcspec-min-function-size=1 \
+; RUN: -funcspec-min-codesize-savings=1 -S < %s | FileCheck %s
----------------
bababuck wrote:

The behavior in these tests was relying on the behavior that I'm changing. That is, the functions that the tests expected to be specialized had very low scores such that their savings fell on the boundary of profitable/not-profitable. With the change from `<` to `<=` being on the boundary is now considered not profitable, so I adjusted these tests to lower the threshold so that they still specialize after my change.

https://github.com/llvm/llvm-project/pull/164867


More information about the llvm-commits mailing list