-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/06/11 03:23, Frederic Riss wrote: > On 6 January 2011 10:27, Frederic Riss <frederic.r...@gmail.com> 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? I thought we removed support for nested SUBREGs some time ago, ISTM that insn should be:
(insn 45 2 46 2 > ../gcc/testsuite/gcc.c-torture/execute/ieee/930529-1.c:2 (set > (subreg:SI reg/v:DI 136 [ d ]) 0) > (const_int 2454267026 [0x92492492])) -1 (nil)) Regardless, the way I'd approach this would be to first track down where insn 45 is either generated or modified and verify each and every change to that insn is correct. That should get you on the right path pretty quickly. jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNJeJPAAoJEBRtltQi2kC7rvsH/jRGEPUvzxm3J1EiPzQ8lqwg D/i4gBu4ttVlTemmJ4xm7onsD1TcggYyyVWayPazFJCXyX3Fi0sfsTSY2m7Ko5tK 506Fy8OSe+pFwSWmhH+BCcUPS7WsvTLnDYN0oFI+xQhbk3D4OllLabR2ybdPChw7 /3UjizPqzV1r4I4ThQ4mVMI3ikcMD7lpUQLcAeDgQTN/+O0FH09zN0Oxdh8BcIeF Anb32n7LNfmqaWQ7gCksh19ckIgpRTwPhCGRBgd2kuONlAATBgKdg7GoATb+KaLt urUGayH76jjk0X+7la9/qyZlA1T9aipTqDN68e2Yre+kM2z5zHVbsm9Jgs+/u9U= =nPA4 -----END PGP SIGNATURE-----