[llvm] [CGP] Split off switch cases with 0 and another power-of-2 const. (PR #139321)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 07:08:52 PDT 2025
fhahn wrote:
> See SwitchCG::SwitchLowering::buildBitTests for similar logic.
Thanks I looked into this and I think it would require adding a new Case kind + lowering: a rough version should be here: https://github.com/llvm/llvm-project/pull/139736
It's slightly more work overall, but it means we don't need to explicitly check for consecutive cases and so on, and only will do it when no other switch-related optimizations trigger.
Would you prefer that direction?
https://github.com/llvm/llvm-project/pull/139321
More information about the llvm-commits
mailing list