bababuck wrote: > Yes. I mean we should move the common logic (ConstantComparesGatherer/switch-to-arithmetic transform) into ValueTracking and reuse it in InstCombine. Understood, thanks for the feedback! https://github.com/llvm/llvm-project/pull/169557