This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/53303] New: Reload/RA issue on paradoxical subreg of subword regsiter for big endian targets
- From: "aurelien.buhrig.gcc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 May 2012 08:52:16 +0000
- Subject: [Bug middle-end/53303] New: Reload/RA issue on paradoxical subreg of subword regsiter for big endian targets
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53303
Bug #: 53303
Summary: Reload/RA issue on paradoxical subreg of subword
regsiter for big endian targets
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: aurelien.buhrig.gcc@gmail.com
There is a RA issue with paradoxical subreg of sub-word register on big endian
targets.
It occurs on a private target but seems also to occur on the sparc 64-bit
target for 32-bit FP registers, and perhaps on hp-pa.
http://gcc.gnu.org/ml/gcc/2012-05/msg00028.html
The given workarounds do not work for my backend.
The target has SImode word_mode and for such an insn (generated during
combine):
(set (subreg:SI (reg:QI 21) 0)
(lshiftrt:SI (reg/v:SI 24) (const_int 31 [0x1f]))
reg:QI 21 is reloaded into (reg:QI 0 r0 [orig:21] [21]).
r0 is a HI register, which makes find_dummy_reload generating a segfault after
computing the subreg:SI regno, which is then -1.
I quickly had a look at assign_hard_reg (ira-color.c) but it seems the
information about such paradoxical subreg is not available from ira_allocno_t
nor ira_object_t when choosing the hard reg, and I'm not sure what to do.