re PR target/34856 (ICE with some constant vectors)

PR target/34856
	* simplifx-rtx.c (simplify_const_binary_operation) [VEC_CONCAT]:
	Consider only CONST_INT, CONST_DOUBLE and CONST_FIXED as constant
	vector elements.

testsuite/ChangeLog:

	PR target/34856
	* gcc.dg/pr34856.c: Use pointer mode for "pin".

From-SVN: r131821
This commit is contained in:
Uros Bizjak 2008-01-25 11:25:21 +01:00
parent 80e67011e3
commit d1f0728e65
4 changed files with 26 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2008-01-25 Uros Bizjak <ubizjak@gmail.com>
PR target/34856
* simplifx-rtx.c (simplify_const_binary_operation) [VEC_CONCAT]:
Consider only CONST_INT, CONST_DOUBLE and CONST_FIXED as constant
vector elements.
2008-01-25 Jakub Jelinek <jakub@redhat.com>
PR middle-end/33333

View File

@ -2916,7 +2916,12 @@ simplify_const_binary_operation (enum rtx_code code, enum machine_mode mode,
if (VECTOR_MODE_P (mode)
&& code == VEC_CONCAT
&& CONSTANT_P (op0) && CONSTANT_P (op1))
&& (CONST_INT_P (op0)
|| GET_CODE (op0) == CONST_DOUBLE
|| GET_CODE (op0) == CONST_FIXED)
&& (CONST_INT_P (op1)
|| GET_CODE (op1) == CONST_DOUBLE
|| GET_CODE (op1) == CONST_FIXED))
{
unsigned n_elts = GET_MODE_NUNITS (mode);
rtvec v = rtvec_alloc (n_elts);

View File

@ -1,3 +1,8 @@
2008-01-25 Uros Bizjak <ubizjak@gmail.com>
PR target/34856
* gcc.dg/pr34856.c: Use pointer mode for "pin".
2008-01-25 Jakub Jelinek <jakub@redhat.com>
PR middle-end/33333
@ -9,7 +14,7 @@
2008-01-25 Olga Golovanevsky <olga@il.ibm.com>
* gcc.dg/struct/wo_prof_malloc_size_var.c: UnXFAIL.
* gcc.dg/struct/wo_prof_malloc_size_var.c: UnXFAIL.
2008-01-24 Daniel Franke <franke.daniel@gmail.com>

View File

@ -2,11 +2,13 @@
/* { dg-options "-O2" } */
/* { dg-options "-O2 -msse2" { target { i?86-*-* x86_64-*-* } } } */
typedef unsigned __attribute__ ((__mode__ (__pointer__))) uintptr_t;
#undef __vector
#define __vector __attribute__((vector_size(16) ))
#define __vector __attribute__ ((__vector_size__ (16)))
typedef __vector signed char qword;
typedef __vector unsigned int VU32;
typedef __vector uintptr_t VU;
extern short g[192 + 16];
@ -14,8 +16,9 @@ void f (qword);
void f1 (unsigned ctr)
{
VU32 pin;
pin = (VU32){(unsigned int) &g[16]};
VU pin;
pin = (VU){(uintptr_t) &g[16]};
do
{
f ((qword) pin);