Further spe.md frob_di_df_2 fix
Joseph S. Myers
joseph@codesourcery.com
Thu Nov 16 02:13:00 GMT 2006
This patch is effectively a continuation to the series in bug 27287.
On powerpc-none-linux-gnuspe --enable-e500_double,
gcc.c-torture/compile/20000405-1.c fails at -O, with frob_di_df_2
using %L with a memory operand whose address is of the form reg+reg.
Since reg+reg addresses cannot be further offset, this yields an ICE.
This patch uses a different instruction sequence in that case to avoid
the need to offset the reg+reg address further. Tested with no
regressions with a cross to powerpc-none-linux-gnuspe. OK to commit
to mainline, 4.2, 4.1?
2006-11-15 Joseph Myers <joseph@codesourcery.com>
* config/rs6000/spe.md (frob_di_df_2): Handle non-offsettable
memory operand.
Index: gcc/config/rs6000/spe.md
===================================================================
--- gcc/config/rs6000/spe.md (revision 118836)
+++ gcc/config/rs6000/spe.md (working copy)
@@ -2223,6 +2223,11 @@
case 0:
return \"evmergehi %0,%1,%1\;mr %L0,%1\";
case 1:
+ /* If the address is not offsettable we need to load the whole
+ doubleword into a 64-bit register and then copy the high word
+ to form the correct output layout. */
+ if (!offsettable_nonstrict_memref_p (operands[1]))
+ return \"evldd%X1 %L0,%y1\;evmergehi %0,%L0,%L0\";
/* If the low-address word is used in the address, we must load
it last. Otherwise, load it first. Note that we cannot have
auto-increment in that case since the address register is
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list