OSDN Git Service

PR target/27790
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 May 2006 06:12:30 +0000 (06:12 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 May 2006 06:12:30 +0000 (06:12 +0000)
        * config/i386/i386.c (ix86_expand_int_vcond): Force cop0
        into register for (code == GTU).

testsuite/ChangeLog:

        * gcc.target/i386/pr27790.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114229 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr27790.c [new file with mode: 0644]

index 97ec80c..1ad4ac8 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-30  Uros Bizjak  <uros@kss-loka.si>
+
+       PR target/27790
+       * config/i386/i386.c (ix86_expand_int_vcond): Force cop0
+       into register for (code == GTU).
+
 2006-05-29  Roger Sayle  <roger@eyesopen.com>
 
        PR tree-optimization/24964
index a557c16..8c33150 100644 (file)
@@ -11485,6 +11485,8 @@ ix86_expand_int_vcond (rtx operands[])
      tricks to turn this into a signed comparison against 0.  */
   if (code == GTU)
     {
+      cop0 = force_reg (mode, cop0);
+
       switch (mode)
        {
        case V4SImode:
index 37ab802..eedd466 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-30  Uros Bizjak  <uros@kss-loka.si>
+
+       PR target/27790
+       * gcc.target/i386/pr27790.c: New test.
+
 2006-05-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        PR libgfortran/27757
diff --git a/gcc/testsuite/gcc.target/i386/pr27790.c b/gcc/testsuite/gcc.target/i386/pr27790.c
new file mode 100644 (file)
index 0000000..e8986c4
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-vectorize -msse2" } */
+
+void binarize (int npixels, unsigned char *b)
+{
+  int i;
+  for (i = 0; i < npixels; i++)
+    b[i] = (b[i] > 225 ? 0xff : 0);
+}