On Mon, Mar 26, 2012 at 9:03 PM, H.J. Lu <hjl.to...@gmail.com> wrote:
>>> Attached patch fixes this situation by (partially) reloading only >>> remaining pseudo(s), leaving UNSPEC in the address RTX. >>> >>> 2012-03-26 Uros Bizjak <ubiz...@gmail.com> >>> >>> PR target/52698 >>> * config/i386/i386-protos.h (ix86_legitimize_reload_address): >>> New prototype. >>> * config/i386/i386.h (LEGITIMIZE_RELOAD_ADDRESS): New define. >>> * config/i386/i386.c: Include reload.h. >>> (ix86_legitimize_reload_address): New function. >>> >>> testsuite/ChangeLog: >>> >>> 2012-03-26 Uros Bizjak <ubiz...@gmail.com> >>> H.J. Lu <hongjiu...@intel.com> >>> >>> PR target/52698 >>> * gcc.target/i386/pr52698.c: New test. >>> >>> The patch was bootstrapped and regression tested on x86_64-pc-linux-gnu >>> {,-m32}. >>> >>> Since fixing reload issues is some kind of black magic, I'd like to >>> ask Ulrich and Richard for their opinion on this approach. >>> >>> H.J., can you please test this fix on x32 testsuite for both address modes? >>> >> >> I am on it. > > There are no regressions in gcc x32 testsuite nor glibc tests for > both address modes. But I didn't check code quality nor SPEC CPU > performance. This fixup should not trigger often (if at all), so there should be no effect on performance. So, committed. Uros.