Blame SOURCES/gcc32-ppc-movdi_internal64.patch

727081
2004-07-25  David Edelsohn  <edelsohn@gnu.org>
727081
727081
	PR target/16239
727081
	* config/rs6000/rs6000.md (movdi_internal64): Further disparage
727081
	f->f.
727081
727081
2002-11-06  David Edelsohn  <edelsohn@gnu.org>
727081
727081
	PR target/8480, optimization/8328
727081
	* config/rs6000/rs6000.md (movdi_internal64): Discourage
727081
	FPR to FPR moves.
727081
727081
2004-12-22  Ben Elliston  <bje@au.ibm.com>
727081
727081
	PR optimization/8328
727081
	* gcc.dg/pr8328.c: New test.
727081
727081
--- gcc/config/rs6000/rs6000.md	16 Jul 2003 11:40:06 -0000
727081
+++ gcc/config/rs6000/rs6000.md	22 Dec 2004 08:31:18 -0000
727081
@@ -8749,7 +8749,7 @@
727081
 }")
727081
 
727081
 (define_insn "*movdi_internal64"
727081
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,f,f,m,r,*h,*h")
727081
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,??f,f,m,r,*h,*h")
727081
 	(match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0"))]
727081
   "TARGET_POWERPC64
727081
    && (gpc_reg_operand (operands[0], DImode)
727081
727081
--- gcc/testsuite/gcc.dg/pr8328.c	1 Jan 1970 00:00:00 -0000
727081
+++ gcc/testsuite/gcc.dg/pr8328.c	22 Dec 2004 08:31:18 -0000
727081
@@ -0,0 +1,117 @@
727081
+/* { dg-do compile { target powerpc64-*-linux* } } */
727081
+/* { dg-options "-O3" } */
727081
+
727081
+/* This test case comes from the original PR.  */
727081
+
727081
+struct list
727081
+{
727081
+  unsigned short type;
727081
+  unsigned int len;
727081
+  void *data;
727081
+  short *ind;
727081
+};
727081
+
727081
+extern int foo (int *);
727081
+extern int bar (void);
727081
+extern int qwe (struct list *);
727081
+extern long check (int *);
727081
+extern void display (int *);
727081
+extern void trace (int *);
727081
+
727081
+int
727081
+myfunc (int *opts, char *str)
727081
+{
727081
+  short num;
727081
+  int loc;
727081
+  int start;
727081
+  int len;
727081
+  int code;
727081
+  int rc = 0;
727081
+
727081
+  if (code && (rc = check (opts)))
727081
+    goto exit;
727081
+
727081
+  foo (&code);
727081
+  {
727081
+    struct list mylist[1];
727081
+    mylist[0].type = 960;
727081
+    mylist[0].len = 4;
727081
+    mylist[0].data = (void *) &loc;
727081
+    mylist[0].ind = 0L;
727081
+    qwe (mylist);
727081
+  }
727081
+  bar ();
727081
+
727081
+  if (code && (rc = check (opts)))
727081
+    goto exit;
727081
+
727081
+  foo (&code);
727081
+  bar ();
727081
+
727081
+  if (code && (rc = check (opts)))
727081
+    goto exit;
727081
+
727081
+  if (opts)
727081
+    trace (opts);
727081
+
727081
+  display (opts);
727081
+
727081
+  while (code >= 0)
727081
+    {
727081
+      foo (&code);
727081
+      {
727081
+        struct list mylist[1];
727081
+        mylist[0].type = 500;
727081
+        mylist[0].len = 2;
727081
+        mylist[0].data = (void *) #
727081
+        mylist[0].ind = 0L;
727081
+        qwe (mylist);
727081
+      }
727081
+      bar ();
727081
+      {
727081
+        struct list mylist[3];
727081
+        mylist[0].type = 960;
727081
+        mylist[0].len = 4;
727081
+        mylist[0].data = (void *) &loc;
727081
+        mylist[0].ind = 0L;
727081
+        mylist[1].type = 496;
727081
+        mylist[1].len = 4;
727081
+        mylist[1].data = (void *) &start;
727081
+        mylist[1].ind = 0L;
727081
+        mylist[2].type = 496;
727081
+        mylist[2].len = 4;
727081
+        mylist[2].data = (void *) &len;
727081
+        mylist[2].ind = 0L;
727081
+        qwe (mylist);
727081
+      }
727081
+      {
727081
+        struct list mylist[4];
727081
+        mylist[0].type = 460;
727081
+        mylist[0].len = 129;
727081
+        mylist[0].data = (void *) str;
727081
+        mylist[0].ind = 0L;
727081
+        mylist[1].type = 460;
727081
+        mylist[1].len = 129;
727081
+        mylist[1].data = (void *) str;
727081
+        mylist[1].ind = 0L;
727081
+        mylist[2].type = 460;
727081
+        mylist[2].len = 9;
727081
+        mylist[2].data = (void *) str;
727081
+        mylist[2].ind = 0L;
727081
+        mylist[3].type = 500;
727081
+        mylist[3].len = 2;
727081
+        mylist[3].data = (void *) str;
727081
+        mylist[3].ind = 0L;
727081
+        qwe (mylist);
727081
+      }
727081
+    }
727081
+
727081
+ exit:
727081
+  {
727081
+    struct list mylist[1];
727081
+    mylist[0].data = (void *) &loc;
727081
+    mylist[0].ind = 0L;
727081
+    qwe (mylist);
727081
+  }
727081
+  return (rc);
727081
+}