This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR57878, Incorrect code: live register clobbered in split2


Hi,

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57878

The bug occurs because tfreq is given higher priority than bigger mode
in reload_pseudo_compare_func. When there are multiple reload pseudos
in the same insnï and the pseudo with bigger mode has lower thread
frequency than other reload pseudos, it is possible the bigger mode
pseudo cannot find available hardregs.

The proposed fix is to switch the priority of bigger mode and tfreq in
reload_pseudo_compare_func. Besides I promoted lra_assert to
gcc_assert at the end of to make adding testcase easier since
lra_assert will not fire on 4.8.1.

bootstrap and regression test are ok on x86_64-linux-gnu. Is it ok for
trunk and 4.8 branch?

Thanks,
Wei.

2013-07-15  Wei Mi  <wmi@google.com>

        PR rtl-optimization/57878
        * lra-assigns.c (reload_pseudo_compare_func): Switch the priority of
        bigger mode and tfreq.

2013-07-15  Wei Mi  <wmi@google.com>

        PR rtl-optimization/57878
        * g++.dg/pr57518.C: New test.

Attachment: patch
Description: Binary data

Attachment: patch_test
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]