Just to reply to my own question, it seems that the x86 compiler does this correctly. In that case, gcc has already replaced the computed jump with a simple jump before the attempt to merge blocks, so it looks like the problem is with the ARM compiler: flow doesn't recognize this special case. I'll find out why. Andrew.