[clang] [llvm] [SimplifyCFG] Emit SelectInst when folding branches to common dest with different PHI incoming values (PR #144434)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 10:33:31 PDT 2025
HighW4y2H3ll wrote:
@david-arm Ahhhh, thx for testing! Let me try get some benchmark running on my end too. One thing I noticed is that `simplifyLoop` also calls to this `foldBranchToCommonDest` function, which is used in many loop passes (e.g. InductiveRangeCheckElimination, LoopBoundSplit, LoopFuse, LoopUnroll, LoopPeel, LoopVectorize etc.). However, `simplifyLoop` is not passing a `TargetTransformInfo` pointer, so neither branch probability nor instruction costs will be checked... maybe that could cause regression too...
https://github.com/llvm/llvm-project/blob/2a8c65e983b3f4e1c83d8028d354f7bacc149015/llvm/lib/Transforms/Utils/LoopSimplify.cpp#L659
https://github.com/llvm/llvm-project/pull/144434
More information about the llvm-commits
mailing list