http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60598
--- Comment #4 from Richard Henderson <rth at gcc dot gnu.org> --- Created attachment 32411 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32411&action=edit proposed patch This appears to fix the bug. This code has a distinctly weird look to it. A doloop insn that doesn't actually loop is the branch we were trying to reorganize. If we'd used a normal compare-and-branch sequence, we'd have been able to use a conditional return here, avoiding the less than ideal branch-over-branch situation. But that's clearly a different problem.