Current implementation of rotateLoop does rotate without carefully compare the number of exit fallthrough and top fallthrough, so it may create more taken branches, as demonstrated by the test case no_rotate.
This patch makes sure the new exit fallthrough is larger than top fallthrough before rotation.