On 6 January 2011 10:27, Frederic Riss <[email protected]> wrote: > Hi, > > I've seen GCC emit many unneeded moves in very simple cases when > handling double floating point values. I tracked this down to the > lower-subreg pass that splits DF->DF moves into DF->(2*SI)->DF moves. > I suppose that the introduced mode changes prevent the IRA from > coalescing the moves and thus I get these ugly unneeded moves. > > I tried to limit the lower-subreg pass to splitting integral types by > constraining MODES_TIEABLE_P. This works for my simple test cases, but > I get some testsuite regressions of the form: > > ../gcc/testsuite/gcc.c-torture/execute/ieee/930529-1.c:27:1: error: > unrecognizable insn: > (insn 45 2 46 2 > ../gcc/testsuite/gcc.c-torture/execute/ieee/930529-1.c:2 (set > (subreg:SI (subreg:DF (reg/v:DI 136 [ d ]) 0) 0) > (const_int 2454267026 [0x92492492])) -1 (nil)) > > My other option is to disable subreg-splitting on my port, but I > wonder what adverse effects it could have on 64bits integral code.
I just realized that I get the same failures when I set flag_split_wide_types to 0. So disabling subreg splitting isn't an alternative solution, it gives the same results as changing MODES_TIEABLE_P. The question remains: is there a way to get rid of these ugly moves and not break anything else? Fred
