[all-commits] [llvm/llvm-project] 889c28: [SimplfyCFG] Set `MD_prof` for `select` used for c...
Mircea Trofin via All-commits
all-commits at lists.llvm.org
Fri Sep 12 07:51:06 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 889c289a409eea443cc5eba54d68cc6a3161be07
https://github.com/llvm/llvm-project/commit/889c289a409eea443cc5eba54d68cc6a3161be07
Author: Mircea Trofin <mtrofin at google.com>
Date: 2025-09-12 (Fri, 12 Sep 2025)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
M llvm/test/Transforms/SimplifyCFG/branch-fold-threshold.ll
M llvm/test/Transforms/SimplifyCFG/branch-fold.ll
M llvm/test/Transforms/SimplifyCFG/preserve-branchweights.ll
Log Message:
-----------
[SimplfyCFG] Set `MD_prof` for `select` used for certain conditional simplifications (#154426)
There’s a pattern where a branch is conditioned on a conjunction or disjunction that ends up being modeled as a `select` where the first operand is set to `true` or the second to `false`. If the branch has known branch weights, they can be copied to the `select`. This is worth doing in case later the `select` gets transformed to something else (i.e. if we know the profile, we should propagate it).
Issue #147390
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