This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] rs6000 fix for 35839
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 07 Apr 2008 16:41:45 -0700
- Subject: [PATCH] rs6000 fix for 35839
- Reply-to: janis187 at us dot ibm dot com
As reported in target/35839, my patch for target/35620 broke bootstrap
for powerpc-darwin, where -maltivec is enabled by default, and causes
may new failures for vectorization tests for powerpc*-*-*. I had fully
tested an earlier version of that patch but performed much less testing
on the modified version I checked in; yet another reminder to never
ever do that.
This patch moves two tree codes from asserts that they will never be
seen in the function to case labels so they will be handled correctly
when they are seen. One of them, ALIGN_INDIRECT_REF, is used in many
vectorization tests on powerpc64-linux. I don't know when
MISALIGNED_INDIRECT_REF would be generated but would rather not find
out by leaving it in an assert.
This patch has been lightly tested and is currently undergoing full
bootstrap and regression testing on powerpc64-linux, OK for trunk if
testing is successful?
2008-04-07 Janis Johnson <janis187@us.ibm.com>
* config/rs6000/rs6000.c (rs6000_check_sdmode): Handle additional
kinds of indirect references.
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c (revision 133983)
+++ gcc/config/rs6000/rs6000.c (working copy)
@@ -11226,9 +11226,6 @@ rs6000_check_sdmode (tree *tp, int *walk
return NULL_TREE;
}
- gcc_assert (TREE_CODE (*tp) != ALIGN_INDIRECT_REF);
- gcc_assert (TREE_CODE (*tp) != MISALIGNED_INDIRECT_REF);
-
switch (TREE_CODE (*tp))
{
case VAR_DECL:
@@ -11237,6 +11234,8 @@ rs6000_check_sdmode (tree *tp, int *walk
case RESULT_DECL:
case REAL_CST:
case INDIRECT_REF:
+ case ALIGN_INDIRECT_REF:
+ case MISALIGNED_INDIRECT_REF:
case VIEW_CONVERT_EXPR:
if (TYPE_MODE (TREE_TYPE (*tp)) == SDmode)
return *tp;