dtcxzyw wrote: Do we need to check whether the condition is only used by the switch? Absorbing constants into switch cases may not be profitable if the condition is also used in other places... https://github.com/llvm/llvm-project/pull/143677