[all-commits] [llvm/llvm-project] bf34b2: [profcheck] Add heuristical profile metadata for l...
Jin Huang via All-commits
all-commits at lists.llvm.org
Wed Oct 8 19:50:51 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bf34b2e2df2ec55483ee678fc7c5c0fbfda35e98
https://github.com/llvm/llvm-project/commit/bf34b2e2df2ec55483ee678fc7c5c0fbfda35e98
Author: Jin Huang <jinhuang1102 at gmail.com>
Date: 2025-10-08 (Wed, 08 Oct 2025)
Changed paths:
M llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
M llvm/test/Transforms/AggressiveInstCombine/lower-table-based-cttz-basics.ll
M llvm/test/Transforms/AggressiveInstCombine/lower-table-based-cttz-dereferencing-pointer.ll
M llvm/test/Transforms/AggressiveInstCombine/lower-table-based-cttz-non-argument-value.ll
M llvm/test/Transforms/AggressiveInstCombine/lower-table-based-cttz-zero-element.ll
Log Message:
-----------
[profcheck] Add heuristical profile metadata for lowering table-based cttz. (#161898)
When lowering a `table-based cttz` calculation to the `llvm.cttz`
intrinsic, `AggressiveInstCombine` was not attaching profile metadata to
the newly generated `select` instruction.
This PR adds heuristic branch weights to the `select`. It uses a strong
100-to-1 probability favoring the `cttz` path over the zero-input case.
This allows later passes to optimize code layout and branch prediction.
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