http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51244
--- Comment #71 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Oleg Endo from comment #70) > Author: olegendo > Date: Sat Oct 12 20:47:22 2013 > New Revision: 203492 > The issue raised in comment #59 has been fixed on 4.9. There are some open issues though, which I will try to address in follow up patches: * The helper functions in sh_treg_combine.cc should go into a separate .h + .cc file. This would allow re-using them in other places and eliminate the similar function 'sh_find_set_of_reg' in sh.c * The RTL pass does the treg combine only when there is a conditional branch. It should also handle conditional move insns (-mpretend-cmove). * The function 'try_combine_comparisons' in sh_reg_combine.cc always introduces reg-reg copies. In some cases (DImode comparisons in particular), these reg-reg moves don't get eliminated afterwards before register allocation. The function should check whether creating new pseudos can be avoided by re-using existing regs. The sh_treg_combine RTL pass could probably be backported to 4.8 but seems too intrusive. Instead something like the patch in comment #64 should do, where instead of checking for 'no_labels_between_p' it would probably be better to check if the basic block with the conditional branch has only one predecessor.