[llvm] [SimplifyCFG] Extend `simplifySwitchOfPowersOfTwo` to reachable defaults (PR #161807)

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 18 00:58:44 PST 2025


zmodem wrote:

Nice!

I worry that `Intrinsic::ctpop` is expensive on targets without a popcount instruction though, such as older x86 and arm without neon support.

Maybe the code should check `TargetTransformInfo::getIntrinsicInstrCost()` first?

https://github.com/llvm/llvm-project/pull/161807


More information about the llvm-commits mailing list