Commit 98ef3137 by Jakub Jelinek Committed by Jakub Jelinek

re PR c/6290 (ICE compiling altivec code with 3.1)

	PR c/6290
	* config/rs6000/rs6000.c (easy_vector_constant): Return 1 if the
	CONST_VECTOR is { 0, ... 0 }.

	* gcc.dg/altivec-5.c: New test.

From-SVN: r52340
parent a6bea8ce
2002-04-16 Jakub Jelinek <jakub@redhat.com>
PR c/6290
* config/rs6000/rs6000.c (easy_vector_constant): Return 1 if the
CONST_VECTOR is { 0, ... 0 }.
2002-04-15 Loren J. Rittle <ljrittle@acm.org> 2002-04-15 Loren J. Rittle <ljrittle@acm.org>
* doc/install.texi (Installing GCC: Configuration): Clarify * doc/install.texi (Installing GCC: Configuration): Clarify
......
...@@ -1219,18 +1219,24 @@ easy_vector_constant (op) ...@@ -1219,18 +1219,24 @@ easy_vector_constant (op)
with CONST0_RTX for the current mode, but let's be safe with CONST0_RTX for the current mode, but let's be safe
instead. */ instead. */
if (GET_CODE (elt) == CONST_INT && INTVAL (elt) != 0) switch (GET_CODE (elt))
return 0; {
case CONST_INT:
if (GET_CODE (elt) == CONST_DOUBLE if (INTVAL (elt) != 0)
&& (CONST_DOUBLE_LOW (elt) != 0 return 0;
|| CONST_DOUBLE_HIGH (elt) != 0)) break;
return 0; case CONST_DOUBLE:
if (CONST_DOUBLE_LOW (elt) != 0 || CONST_DOUBLE_HIGH (elt) != 0)
return 0;
break;
default:
return 0;
}
} }
/* We could probably generate a few other constants trivially, but /* We could probably generate a few other constants trivially, but
gcc doesn't generate them yet. FIXME later. */ gcc doesn't generate them yet. FIXME later. */
return 0; return 1;
} }
/* Return 1 if the operand is the constant 0. This works for scalars /* Return 1 if the operand is the constant 0. This works for scalars
......
2002-04-16 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/altivec-5.c: New test.
2002-04-15 Mark Mitchell <mark@codesourcery.com> 2002-04-15 Mark Mitchell <mark@codesourcery.com>
* testsuite/lib/chill.exp: Remove. * testsuite/lib/chill.exp: Remove.
......
/* { dg-do compile { target powerpc-*-* } } */
/* { dg-options "-maltivec -O2" } */
#define vector __attribute__((vector_size(16)))
void foo (const unsigned long x,
vector signed int a, vector signed int b)
{
unsigned char d[64];
__builtin_altivec_stvewx (b, 0, d);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment