Patchwork Fix target/44877 (powerpc vectorization failure)

login
register
mail settings
Submitter Michael Meissner
Date July 8, 2010, 10:45 p.m.
Message ID <20100708224543.GA21020@hungry-tiger.westford.ibm.com>
Download mbox | patch
Permalink /patch/58310/
State New
Headers show

Comments

Michael Meissner - July 8, 2010, 10:45 p.m.
This patch fixes target/44877 which allows dealII to be compiled on powerpc
systems with either Altivec or VSX vector instruction sets.  I have done a
bootstrap with the compiler and verified that there are no regressions in the
C, C++, and fortran testsuites.  Is this ok to install?
David Edelsohn - July 9, 2010, 2:03 a.m.
On Thu, Jul 8, 2010 at 6:45 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> This patch fixes target/44877 which allows dealII to be compiled on powerpc
> systems with either Altivec or VSX vector instruction sets.  I have done a
> bootstrap with the compiler and verified that there are no regressions in the
> C, C++, and fortran testsuites.  Is this ok to install?

Okay.

Thanks, David

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 161930)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -11522,7 +11522,7 @@  rs6000_expand_builtin (tree exp, rtx tar
 	gcc_assert (TARGET_ALTIVEC);
 
 	arg = CALL_EXPR_ARG (exp, 0);
-	gcc_assert (TREE_CODE (TREE_TYPE (arg)) == POINTER_TYPE);
+	gcc_assert (POINTER_TYPE_P (TREE_TYPE (arg)));
 	op = expand_expr (arg, NULL_RTX, Pmode, EXPAND_NORMAL);
 	addr = memory_address (mode, op);
 	if (fcode == ALTIVEC_BUILTIN_MASK_FOR_STORE)