]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/24367 (unrecognizable insn with -fPIC -O2 -funroll-loops)
authorAndreas Krebbel <krebbel1@de.ibm.com>
Thu, 31 Aug 2006 07:43:36 +0000 (07:43 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Thu, 31 Aug 2006 07:43:36 +0000 (07:43 +0000)
2006-08-31  Andreas Krebbel  <krebbel1@de.ibm.com>

PR target/24367
* config/s390/s390.md ("movsi", "movdi" expander): Accept rtxes like
r12 + SYMBOLIC_CONST.

2006-08-31  Andreas Krebbel  <krebbel1@de.ibm.com>

PR target/24367
* gcc.dg/pr24367.c: New testcase.

From-SVN: r116599

gcc/ChangeLog
gcc/config/s390/s390.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr24367.c [new file with mode: 0644]

index 795c0a7181bc47b8e71e17b9738e26b1967e552b..8f1fd3476169b745b64c64d94ae6f5800d1e9e38 100644 (file)
@@ -1,3 +1,9 @@
+2006-08-31  Andreas Krebbel  <krebbel1@de.ibm.com>
+
+       PR target/24367
+       * config/s390/s390.md ("movsi", "movdi" expander): Accept rtxes like
+       r12 + SYMBOLIC_CONST.
+
 2006-08-30  Richard Guenther  <rguenther@suse.de>
 
        * Makefile.in (see.o): Add $(EXPR_H) dependency.
index d6443e0877175c73b4e3b75bc4bd28f5f647535a..eb734e15e13265945e2c6df950750b8111c90eeb 100644 (file)
   ""
 {
   /* Handle symbolic constants.  */
-  if (TARGET_64BIT && SYMBOLIC_CONST (operands[1]))
+  if (TARGET_64BIT
+      && (SYMBOLIC_CONST (operands[1])
+         || (GET_CODE (operands[1]) == PLUS
+             && XEXP (operands[1], 0) == pic_offset_table_rtx
+             && SYMBOLIC_CONST (XEXP (operands[1], 1)))))
     emit_symbolic_move (operands);
 })
 
   ""
 {
   /* Handle symbolic constants.  */
-  if (!TARGET_64BIT && SYMBOLIC_CONST (operands[1]))
+  if (!TARGET_64BIT
+      && (SYMBOLIC_CONST (operands[1])
+         || (GET_CODE (operands[1]) == PLUS
+             && XEXP (operands[1], 0) == pic_offset_table_rtx
+             && SYMBOLIC_CONST (XEXP(operands[1], 1)))))
     emit_symbolic_move (operands);
 })
 
index ad0a274a28eb646d10dfca09b9e5a7787b843929..2e6cec9e1b4ca7dac5c999919d6de8c2d3bd044f 100644 (file)
@@ -1,3 +1,8 @@
+2006-08-31  Andreas Krebbel  <krebbel1@de.ibm.com>
+
+       PR target/24367
+       * gcc.dg/pr24367.c: New testcase.
+
 2006-08-30  Joseph Myers  <joseph@codesourcery.com>
 
        * gcc.dg/arm-mmx-1.c: Skip for -mfloat-abi=softfp.
diff --git a/gcc/testsuite/gcc.dg/pr24367.c b/gcc/testsuite/gcc.dg/pr24367.c
new file mode 100644 (file)
index 0000000..6486719
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile { target fpic } } */
+/* { dg-options "-O2 -fPIC -funroll-loops" } */
+
+char *
+test (const char *parent, const char *child)
+{
+  static char rtn_path[1024];
+  char *s = rtn_path;
+  char *s_end = rtn_path + sizeof (rtn_path);
+  const char *s2 = child;
+
+  while (*s != '\0')
+    s++;
+  while ((s < s_end) && (*s2 != '\0'))
+    *s++ = *s2++;
+  return (rtn_path);
+}