Hi Vladimir, Sorry this took so long. I have tidied up the patch as you suggested and fixed some style issues. Hope this looks better now.
Thanks! David. 2014-09-26 David Sherwood <david.sherw...@arm.com> * ira-int.h (ira_allocno): Add "wmode" field. * ira-build.c (create_insn_allocnos): Add new "parent" function parameter. * ira-conflicts.c (ira_build_conflicts): Add conflicts for registers that cannot be accessed in wmode. -----Original Message----- From: David Sherwood [mailto:david.sherw...@arm.com] Sent: 08 September 2014 12:48 To: 'gcc-patches@gcc.gnu.org' Cc: 'vmaka...@redhat.com' Subject: RE: Fix for "FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o compile, (internal compiler error)" Hi Vladimir, Sorry, I forgot to CC you on this as it's your code. It's my first attempt at submitting patches to gcc so I'm still learning as I go! Kind Regards, David Sherwood. -----Original Message----- From: David Sherwood [mailto:david.sherw...@arm.com] Sent: 05 September 2014 15:52 To: 'gcc-patches@gcc.gnu.org' Subject: Fix for "FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o compile, (internal compiler error)" Hi, I have a potential fix for a gcc testsuite failure for aarch64 in big endian, i.e. FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o compile, (internal compiler error) FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_y_tst.o compile, (internal compiler error) It is caused by the inappropriate choice of hard registers for paradoxical sub registers in big endian mode, for example if register 0 is chosen for a paradoxical TI subreg on big endian then we may end up attempting to reference register -1. Similarly, on little endian we could end up going beyond the upper bounds of the register file too. My fix involves adding particular constraints in IRA on the choice of register once paradoxical sub registers are encountered. However, Richard Sandiford also proposed an alternative solution that involves not constraining registers in IRA, but rather making use of cost analysis instead and letting LRA do the work. Not sure what your preference is .... Fix was tested on aarch64 on little and big endian with no regressions. Regards, David Sherwood. 2014-08-26 David Sherwood <david.sherw...@arm.com> * ira-int.h (ira_allocno): Add "wmode" field. * ira-build.c (create_insn_allocnos): Add new "parent" function parameter. * ira-conflicts.c (ira_build_conflicts): Add conflicts for registers that cannot be accessed in wmode.
rb2369.patch
Description: Binary data