diff options
author | Roger Sayle <roger@eyesopen.com> | 2006-05-16 04:16:00 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-05-16 04:16:00 +0000 |
commit | d0b898529b9ac6e3c227567a197d12dcf71dc800 (patch) | |
tree | 1c68ea8e0d38ca424a0acc2d3a6cf4b1a617a9cd /gcc | |
parent | a0cfeb0fcd3953ba10886a4a5d2b33b9d4bd1d7d (diff) | |
download | gcc-d0b898529b9ac6e3c227567a197d12dcf71dc800.zip gcc-d0b898529b9ac6e3c227567a197d12dcf71dc800.tar.gz gcc-d0b898529b9ac6e3c227567a197d12dcf71dc800.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 23 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr26600.c | 14 |
4 files changed, 51 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f01eebd..b411986 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +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> * crtstuff.c (__dso_handle): Set section from diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c81dee8..3ff5abb 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5934,6 +5934,18 @@ legitimate_constant_p (rtx x) return false; 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: break; } @@ -5949,6 +5961,17 @@ legitimate_constant_p (rtx x) static bool 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); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 529a209..9f65c93 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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> PR c++/27505 diff --git a/gcc/testsuite/gcc.target/i386/pr26600.c b/gcc/testsuite/gcc.target/i386/pr26600.c new file mode 100644 index 0000000..bbe0663 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr26600.c @@ -0,0 +1,14 @@ +/* { 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; + } +} + |