[all-commits] [llvm/llvm-project] fa2eab: [SimplifyCFG] Hoist common code for switch multi-c...
Kunqiu Chen via All-commits
all-commits at lists.llvm.org
Fri Dec 5 22:45:19 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fa2eabd7706d2f47064c980b456d3a255e9ea3f3
https://github.com/llvm/llvm-project/commit/fa2eabd7706d2f47064c980b456d3a255e9ea3f3
Author: Kunqiu Chen <camsyn at foxmail.com>
Date: 2025-12-06 (Sat, 06 Dec 2025)
Changed paths:
M clang/test/Headers/__clang_hip_math.hip
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
M llvm/test/Transforms/SimplifyCFG/hoist-common-code.ll
Log Message:
-----------
[SimplifyCFG] Hoist common code for switch multi-case destinations (#165700)
Previously, hoistCommonCodeFromSuccessors did not support hoisting
common code for multi-case destinations of `switch`.
However, if all the predecessors of a given Succ are the same (i.e.,
multi-case destination), it is safe to hoist the common code from Succ
to Pred, which is what this PR does.
See discussion
https://github.com/llvm/llvm-project/pull/165570#discussion_r2473290327.
Alive2 proof: https://alive2.llvm.org/ce/z/cYuczq
Optimization Impact:
https://github.com/dtcxzyw/llvm-opt-benchmark/pull/3003
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