re PR middle-end/17767 (MMX intrinsics cause internal compiler error)
authorUros Bizjak <uros@kss-loka.si>
Tue, 4 Jan 2005 15:44:25 +0000 (16:44 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 4 Jan 2005 15:44:25 +0000 (16:44 +0100)
PR middle-end/17767
* cse.c (fold_rtx) [RTX_COMPARE, RTX_COMM_COMPARE]: Don't attempt
any simplifications of vector mode comparison operators.
* simplify-rtx.c (simplify_relational_operation): Fix variable name.

testsuite:

* gcc.dg/i386-mmx-6.c: New test case.

From-SVN: r92896

gcc/ChangeLog
gcc/cse.c
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/i386-mmx-6.c [new file with mode: 0644]

index 5d83e223b04b43776c22fc18fa25e5cdd07365f2..14c24385cbf650aed8a84289c4a2a48fee99185e 100644 (file)
@@ -1,8 +1,14 @@
+2005-01-04  Uros Bizjak  <uros@kss-loka.si>
+
+       PR middle-end/17767
+       * cse.c (fold_rtx) [RTX_COMPARE, RTX_COMM_COMPARE]: Don't attempt
+       any simplifications of vector mode comparison operators.
+       * simplify-rtx.c (simplify_relational_operation): Fix variable name.
+
 2005-01-04  Paolo Bonzini  <bonzini@gnu.org>
            Devang Patel  <dpatel@apple.com>
 
        PR tree-optimization/18308
-
        * tree-if-conv.c (add_to_dst_predicate_list): Gimplify
        the operands before creating a new expression.
        * dojump.c (do_jump): Make drop_through_label available
index 09c113b7e201086a43532c8ca0acbdb25b8d372a..766c7252de3bd265f9916faaf613dd99ee823682 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3865,6 +3865,10 @@ fold_rtx (rtx x, rtx insn)
         constant, set CONST_ARG0 and CONST_ARG1 appropriately.  We needn't
         do anything if both operands are already known to be constant.  */
 
+      /* ??? Vector mode comparisons are not supported yet.  */
+      if (VECTOR_MODE_P (mode))
+       break;
+
       if (const_arg0 == 0 || const_arg1 == 0)
        {
          struct table_elt *p0, *p1;
index 6525e1604aafbc4f8442ec3850efd6b10bb79df5..6e208aa9d9a6a4e269827a7421c83f374a76313f 100644 (file)
@@ -2757,7 +2757,7 @@ simplify_relational_operation (enum rtx_code code, enum machine_mode mode,
 #ifdef VECTOR_STORE_FLAG_VALUE
          {
            int i, units;
-           rtvec c;
+           rtvec v;
 
            rtx val = VECTOR_STORE_FLAG_VALUE (mode);
            if (val == NULL_RTX)
index c376fce25a9ede18f0fe7c62026c405c021f6336..a1b44429762b553629cf3490fe1748667d88551d 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-04  Uros Bizjak  <uros@kss-loka.si>
+
+       PR middle-end/17767
+       * gcc.dg/i386-mmx-6.c: New test case.
+
 2005-01-04  Paolo Bonzini  <bonzini@gnu.org>
 
        PR tree-optimization/18308
diff --git a/gcc/testsuite/gcc.dg/i386-mmx-6.c b/gcc/testsuite/gcc.dg/i386-mmx-6.c
new file mode 100644 (file)
index 0000000..8938d2c
--- /dev/null
@@ -0,0 +1,17 @@
+/* PR middle-end/17767 */
+/* Contributed by Volker Reichelt <reichelt@igpm.rwth-aachen.de> */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O -mmmx" } */
+typedef int __m64 __attribute__ ((vector_size (8)));
+typedef short __v4hi __attribute__ ((vector_size (8)));
+
+__m64 foo ()
+{
+  int i;
+  __m64 m;
+
+  for (i = 0; i < 2; i++)
+    m = (__m64) __builtin_ia32_pcmpeqw ((__v4hi) m, (__v4hi) m);
+
+  return m;
+}