Replacing a jump (one instruction) by a branch/switch/return (whatever the jump points to, also one instruction) cannot increase the number of instructions, and can be helpful to to things like foldPathConstants that run just after duplicateTails. In most cases we already do this, as the block will have few predecessors, but we should do it unconditionally. The benefit is almost certainly negligible (a quick experiment shows we only neglect to do this optimization 23 times on all of JetStream2), but the change is microscopic too (literally just one line).
Created attachment 368524 [details] Patch
Comment on attachment 368524 [details] Patch Forget it, I got confused between successors and predecessors, this check does not do at all what I thought.