diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/all_one_m128i.c | 14 |
4 files changed, 25 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d907434..7c8880f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-04-1 Xinliang David Li <davidxl@google.com> + + * config/i386/i386.c (legitimate_constant_p): Recognize + all one vector constant. + 2009-04-01 Jan-Benedict Glaw <jbglaw@jbglaw-dev.homezone.telefonica.de> * gcc/config/vax/vax.c: Add #includes to silence warnings. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 09a6597..8c89823 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8951,9 +8951,8 @@ legitimate_constant_p (rtx x) break; case CONST_VECTOR: - if (x == CONST0_RTX (GET_MODE (x))) - return true; - return false; + if (!standard_sse_constant_p (x)) + return false; default: break; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3723cb7..74daab6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-04-01 Xinliang David Li <davidxl@google.com> + + * gcc.target/i386/all_one_m128i.c: New test. + 2009-04-01 Janis Johnson <janis187@us.ibm.com> PR c/33466 diff --git a/gcc/testsuite/gcc.target/i386/all_one_m128i.c b/gcc/testsuite/gcc.target/i386/all_one_m128i.c new file mode 100644 index 0000000..fa973e4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/all_one_m128i.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -msse2" } */ + +typedef long long __m128i __attribute__ ((__vector_size__ (16))); +typedef int __v4si __attribute__ ((__vector_size__ (16))); + +__m128i foo () +{ + __m128i minus_1 = (__m128i) (__v4si) { -1, -1, -1, -1 }; + + return minus_1; +} + +/* { dg-final { scan-assembler "pcmpeqd" } } */ |