On Mon, Aug 13, 2012 at 9:39 PM, Igor Zamyatin <izamya...@gmail.com> wrote:
> Patch aims to fix instability introduced by first scheduler on x86. In > particular it targets following list: > > [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46843 > [2] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46829 > [3] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36680 > [4] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42295 > > Main idea of this activity is mostly to provide user a possibility to > safely turn on first scheduler for his codes. In some cases this could > positively affect performance, especially for in-order Atom. > > It would be great to hear some feedback from the community about the change. The 46829 failure is due to combine pass blindly propagating r8 into divmod instruction. This is invalid for divmod, which expects ax there. This can be fixed by introducing "ax_register_operand" predicate, but I think that combine shouldn't propagate hard registers. This blocks register allocator, and we have many passes that handle propagation of hard registers after IRA much more effectively. Various "*_not_xmm0_*" predicates were introduced just to fight this issue. They would be immediately obsolete with above combine change. IMO, preventing combine to propagate hard regs will fix 90% of spill failures on x86. Uros.