On Wed, Oct 19, 2011 at 01:36:25PM -0700, Richard Henderson wrote: > Although I think a good followup would be to fix > this so that we don't need a copy to another register. > That could be done by adding a d.one_operand field, and > using that test instead of explicit equality everywhere.
Perhaps. BTW, I've recently noticed that CSE isn't able to CSE when SET_DEST is a SUBREG, even when it is same size SUBREG. Apparently there are hundreds of places in at least the i386 backend that do emit_insn (gen_* (gen_lowpart (V???mode, something), ...)); Some of them could be changed without big difficulties (if something is used in the same routine, just create the pseudo with different mode and use gen_lowpart on the use side instead), but there are many places that use say gen_lowpart (V???mode, target) on the LHS. Should CSE be taught to handle this, or should CSE early on replace these (set (subreg:M (reg:N X) 0) ...) with (set (reg:M Y) ...) (set (reg:N X) (subreg:N (reg:M Y) 0)) so that CSE etc. can optimize it, something else? Jakub