Blame SOURCES/gcc32-ppc-movdi_internal64.patch

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