This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PowerPC] linuxspe ICE
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Cc: David Edelsohn <dje at watson dot ibm dot com>
- Date: Thu, 30 Mar 2006 14:35:22 +0930
- Subject: [PowerPC] linuxspe ICE
The testcase in PR26459 comment #12 will ICE with an unrecognized insn
if compiled with -mabi=ibmlongdouble -mabi=spe -mfloat-gprs=double -O2.
This patch fixes the problem by disabling an incorrect optimization.
Tested with a powerpc-linux -> powerpc-linuxspe cross build.
This appears to be a regression from 3.3, so OK mainline, 4.1 and 4.0?
* config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Don't
optimize to lo_sum for DFmode if !TARGET_FPRS.
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c (revision 112399)
+++ gcc/config/rs6000/rs6000.c (working copy)
@@ -3349,9 +3374,11 @@ rs6000_legitimize_reload_address (rtx x,
&& !flag_pic
#endif
/* Don't do this for TFmode, since the result isn't offsettable.
- The same goes for DImode without 64-bit gprs. */
+ The same goes for DImode without 64-bit gprs and DFmode
+ without fprs. */
&& mode != TFmode
- && (mode != DImode || TARGET_POWERPC64))
+ && (mode != DImode || TARGET_POWERPC64)
+ && (mode != DFmode || TARGET_FPRS))
{
#if TARGET_MACHO
if (flag_pic)
--
Alan Modra
IBM OzLabs - Linux Technology Centre