On Tue, Aug 14, 2012 at 10:45:18AM +0200, Uros Bizjak wrote: > > 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. > > Probably, we can live with the check that propagated hard register > really satisfies operand constraint. > > Jakub, do you have any opinion here?
The combiner doesn't propagate likely spilled hard registers (when they appear in a pseudo <= hard reg or hard reg <= pseudo simple assignments), see cant_combine_insn_p. It does propagate other hard registers, and removing that could probably pessimize quite a lot of targets. Jakub