http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59535
--- Comment #14 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- (In reply to Richard Earnshaw from comment #13) > When not optimizing for size, the register allocator should be able to use > the high registers as alternatives to spill slots (copy the value to a high > register rather than spill it to the stack). Once we have that, it would > make sense for the few cases where high registers are permitted to > legitimately use the copy that is up there rather than moving it back again > to a low register first, so I wouldn't want to change the insn patterns to > remove high registers entirely from operations like add, sub and compare. > I'll continue my work on this problem in 2 weeks (after my vacation). I'd like to implement the proposed spilling into high regs and try to tune choosing insn alternatives closer to reload (but it is very sensitive area as it affects code generation for other LRA targets). > On the other hand, LRA does need to be aware that once a value is in a high > register, really spilling it to memory, or loading it from memory is an > expensive operation, since such transfers have to go via a low register.