]> gcc.gnu.org Git - gcc.git/commitdiff
s390.md ("load_multiple", [...]): Allow only if reload_completed.
authorUlrich Weigand <uweigand@de.ibm.com>
Sun, 7 Mar 2004 02:41:53 +0000 (02:41 +0000)
committerUlrich Weigand <uweigand@gcc.gnu.org>
Sun, 7 Mar 2004 02:41:53 +0000 (02:41 +0000)
ChangeLog:

* config/s390/s390.md ("load_multiple", "*load_multiple_di",
"*load_multiple_si"): Allow only if reload_completed.
("store_multiple", "*store_multiple_di", "*store_multiple_si"):
Likewise.

testsuite/ChangeLog:

* gcc.dg/20040306-1.c: New test.

From-SVN: r79045

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

index 86dd3376858e246cf9ec793da633c456d767ba44..2fe6cbb639576cb6e333942439b443e0171249c5 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-06  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * config/s390/s390.md ("load_multiple", "*load_multiple_di",
+       "*load_multiple_si"): Allow only if reload_completed.
+       ("store_multiple", "*store_multiple_di", "*store_multiple_si"):
+       Likewise.
+
 2004-03-06  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/vax/vax-protos.h: Add a prototype for
index cc8655d676662b3d0eda690b9994df35a17a8c51..6550517bccf803e330eced364bf3f853d9460b1f 100644 (file)
 ;
 ; load_multiple pattern(s).
 ;
+; ??? Due to reload problems with replacing registers inside match_parallel
+; we currently support load_multiple/store_multiple only after reload.
+;
 
 (define_expand "load_multiple"
   [(match_par_dup 3 [(set (match_operand 0 "" "")
                          (match_operand 1 "" ""))
                     (use (match_operand 2 "" ""))])]
-  ""
+  "reload_completed"
 {
   enum machine_mode mode;
   int regno;
   [(match_parallel 0 "load_multiple_operation"
                   [(set (match_operand:DI 1 "register_operand" "=r")
                         (match_operand:DI 2 "s_operand" "QS"))])]
-  "word_mode == DImode"
+  "reload_completed && word_mode == DImode"
 {
   int words = XVECLEN (operands[0], 0);
   operands[0] = gen_rtx_REG (DImode, REGNO (operands[1]) + words - 1);
   [(match_parallel 0 "load_multiple_operation"
                   [(set (match_operand:SI 1 "register_operand" "=r,r")
                         (match_operand:SI 2 "s_operand" "Q,S"))])]
-  ""
+  "reload_completed"
 {
   int words = XVECLEN (operands[0], 0);
   operands[0] = gen_rtx_REG (SImode, REGNO (operands[1]) + words - 1);
   [(match_par_dup 3 [(set (match_operand 0 "" "")
                          (match_operand 1 "" ""))
                     (use (match_operand 2 "" ""))])]
-  ""
+  "reload_completed"
 {
   enum machine_mode mode;
   int regno;
   [(match_parallel 0 "store_multiple_operation"
                   [(set (match_operand:DI 1 "s_operand" "=QS")
                         (match_operand:DI 2 "register_operand" "r"))])]
-  "word_mode == DImode"
+  "reload_completed && word_mode == DImode"
 {
   int words = XVECLEN (operands[0], 0);
   operands[0] = gen_rtx_REG (DImode, REGNO (operands[2]) + words - 1);
   [(match_parallel 0 "store_multiple_operation"
                   [(set (match_operand:SI 1 "s_operand" "=Q,S")
                         (match_operand:SI 2 "register_operand" "r,r"))])]
-  ""
+  "reload_completed"
 {
   int words = XVECLEN (operands[0], 0);
   operands[0] = gen_rtx_REG (SImode, REGNO (operands[2]) + words - 1);
index d80f1cf00c8cb76db747cad91ff0fd49d54b2b2c..9acab5d290e1c25e3b630c4ba9dc11a20573a0f4 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-06  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * gcc.dg/20040306-1.c: New test.
+
 2004-03-06  Kazu Hirata  <kazu@cs.umass.edu>
 
        * gcc.dg/sibcall-3.c (recurser_void1, recurser_void2): Make
diff --git a/gcc/testsuite/gcc.dg/20040306-1.c b/gcc/testsuite/gcc.dg/20040306-1.c
new file mode 100644 (file)
index 0000000..903d20a
--- /dev/null
@@ -0,0 +1,22 @@
+/* This used to ICE due to a reload bug on s390*.  */
+
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+
+typedef struct test
+{
+  unsigned short pad;
+  unsigned char type[6];
+} t;
+
+extern void set (t *a, t *b, t *c, t *d, t *e, t *f, t *g, t *h, 
+                t *i, t *j, t *k, t *l, t *m, t *n, t *o, t *p);
+extern void use (t a, t b, t c, t d, t e, t f, t g, t h,
+                t i, t j, t k, t l, t m, t n, t o, t p);
+void test (void)
+{
+    t a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p;
+    set (&a, &b, &c, &d, &e, &f, &g, &h, &i, &j, &k, &l, &m, &n, &o, &p);
+    use (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
+}
This page took 0.119717 seconds and 5 git commands to generate.