[all-commits] [llvm/llvm-project] afeee2: [VectorCombine] Use TCK_CodeSize for size-optimize...
陈子昂 via All-commits
all-commits at lists.llvm.org
Fri Jun 12 18:32:31 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: afeee229f5160fecf427571141165a4d97c93f00
https://github.com/llvm/llvm-project/commit/afeee229f5160fecf427571141165a4d97c93f00
Author: 陈子昂 <2802328816 at qq.com>
Date: 2026-06-13 (Sat, 13 Jun 2026)
Changed paths:
M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
A llvm/test/Transforms/VectorCombine/X86/fold-signbit-reduction-cmp-codesize.ll
Log Message:
-----------
[VectorCombine] Use TCK_CodeSize for size-optimized functions (#202207)
VectorCombine currently uses `TCK_RecipThroughput` for all functions,
including functions optimized for size.
Select `TCK_CodeSize` when `Function::hasOptSize()` is true, covering
both `-Os` (`optsize`) and `-Oz` (`minsize`), while retaining
`TCK_RecipThroughput` for the default optimization mode.
The X86 regression test demonstrates a sign-bit reduction where the
throughput cost model folds an `or` reduction into a `umax` reduction.
The code-size model preserves the smaller form for `optsize` and
`minsize` functions, while the default function retains the existing
throughput-oriented transformation.
Fixes #153375.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list