On Mon, Nov 5, 2012 at 8:43 AM, Vladimir Makarov <vmaka...@redhat.com> wrote: > The following patch fixes PR55151. The patch affects a sensitive part of > LRA code. So it took some time to find a PR solution. For the test there > were to many reloads into hard registers for an insn and LRA failed to > assign hard registers to all reload pseudos. There is another more costly > alternative for the insn which accepts memory but we need to put pseudo > value into memory for that. LRA did not do it. The patch adds this > possibility. The patch also discourage putting pseudo values into memory by > increasing reject. Without this code, several GCC tests checking assembler > code quality failed. The patch changes SPEC2000 code for a few tests but > overall score is the same. > > The patch was successfully bootstrapped and tested on x86/x86-64. > > Committed as rev. 193170. > > > 2012-11-05 Vladimir Makarov <vmaka...@redhat.com> > > PR rtl-optimization/55151 > * lra-constraints.c (process_alt_operands): Permit putting reg > value into memory. Increase reject for this case. > > 2012-11-05 Vladimir Makarov <vmaka...@redhat.com> > > PR rtl-optimization/55151 > * gcc.dg/pr55151.c: New test. > >
It doesn't work on Linux/x86-64: [hjl@gnu-tools-1 gcc]$ /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ /export/gnu/import/git/gcc/gcc/testsuite/gcc.dg/pr55151.c -fno-diagnostics-show-caret -fPIC -S -o pr55151.s -mno-lra [hjl@gnu-tools-1 gcc]$ /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ /export/gnu/import/git/gcc/gcc/testsuite/gcc.dg/pr55151.c -fno-diagnostics-show-caret -fPIC -S -m32 -o pr55151.s /export/gnu/import/git/gcc/gcc/testsuite/gcc.dg/pr55151.c: In function ‘f4’: /export/gnu/import/git/gcc/gcc/testsuite/gcc.dg/pr55151.c:13:1: internal compiler error: in assign_by_spills, at lra-assigns.c:1217 0x8c7333 assign_by_spills /export/gnu/import/git/gcc/gcc/lra-assigns.c:1217 0x8c7c5f lra_assign() /export/gnu/import/git/gcc/gcc/lra-assigns.c:1369 0x8c25bd lra(_IO_FILE*) /export/gnu/import/git/gcc/gcc/lra.c:2303 0x878004 do_reload /export/gnu/import/git/gcc/gcc/ira.c:4624 0x878212 rest_of_handle_reload /export/gnu/import/git/gcc/gcc/ira.c:4737 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. [hjl@gnu-tools-1 gcc]$ -- H.J.