Comment by neoden
> If the function is called from 37 places, should they all repeat the if statement?
the idea here is probably that in this case we might be able to split our function into two implementing true and false branches and then call them from 21 and 16 places respectively
That's possible only if the condition is constant-foldable.
You can achieve it by turning the if part into an inline function.
Before:
after: Now you don't do anything to those 37 places. The function is inlined, and the conditional disappears due to cond being constant.