Commit d0b89852 by Roger Sayle Committed by Roger Sayle

re PR target/26600 (internal compiler error: in push_reload, at reload.c:1303)


	PR target/26600
	* config/i386/i386.c (legitimate_constant_p) <CONST_DOUBLE>: TImode
	integer constants other than zero are only legitimate on TARGET_64BIT.
	<CONST_VECTOR> Only zero vectors are legitimate.
	(ix86_cannot_force_const_mem): Integral and vector constants can
	always be put in the constant pool.

	* gcc.target/i386/pr26600.c: New test case.

From-SVN: r113818
parent a0cfeb0f
2006-05-15 Roger Sayle <roger@eyesopen.com>
PR target/26600
* config/i386/i386.c (legitimate_constant_p) <CONST_DOUBLE>: TImode
integer constants other than zero are only legitimate on TARGET_64BIT.
<CONST_VECTOR> Only zero vectors are legitimate.
(ix86_cannot_force_const_mem): Integral and vector constants can
always be put in the constant pool.
2006-05-16 DJ Delorie <dj@redhat.com> 2006-05-16 DJ Delorie <dj@redhat.com>
* crtstuff.c (__dso_handle): Set section from * crtstuff.c (__dso_handle): Set section from
......
...@@ -5934,6 +5934,18 @@ legitimate_constant_p (rtx x) ...@@ -5934,6 +5934,18 @@ legitimate_constant_p (rtx x)
return false; return false;
break; break;
case CONST_DOUBLE:
if (GET_MODE (x) == TImode
&& x != CONST0_RTX (TImode)
&& !TARGET_64BIT)
return false;
break;
case CONST_VECTOR:
if (x == CONST0_RTX (GET_MODE (x)))
return true;
return false;
default: default:
break; break;
} }
...@@ -5949,6 +5961,17 @@ legitimate_constant_p (rtx x) ...@@ -5949,6 +5961,17 @@ legitimate_constant_p (rtx x)
static bool static bool
ix86_cannot_force_const_mem (rtx x) ix86_cannot_force_const_mem (rtx x)
{ {
/* We can always put integral constants and vectors in memory. */
switch (GET_CODE (x))
{
case CONST_INT:
case CONST_DOUBLE:
case CONST_VECTOR:
return false;
default:
break;
}
return !legitimate_constant_p (x); return !legitimate_constant_p (x);
} }
......
2006-05-15 Roger Sayle <roger@eyesopen.com>
PR target/26600
* gcc.target/i386/pr26600.c: New test case.
2006-05-15 Mark Mitchell <mark@codesourcery.com> 2006-05-15 Mark Mitchell <mark@codesourcery.com>
PR c++/27505 PR c++/27505
/* { dg-do compile } */
/* { dg-options "-O -ftree-vectorize -msse2" } */
void foo(int *p, int N)
{
int i;
for (i=0; i<8; ++i, ++p)
{
int j = N+2*(N+p[0]), k = 2*N+p[0];
p[0] = j+N;
p[5] = j+k;
}
}
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