* config/i386/i386.md (addti3 splitter): Pass arrays of 3 operands
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Apr 2008 18:38:35 +0000 (18:38 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Apr 2008 18:38:35 +0000 (18:38 +0000)
        to split_ti instead of three separate calls with single member arrays.
        (subti3 splitter): Ditto.
        (adddi3 splitter): Ditto with split_di.
        (subdi3 splitter): Ditto.
        (negti2 splitter): Pass arrays of 2 operands to split_ti instead of
        two separate calls with single member arrays.  Swap match_dup
        operands 1 and 2 to better fit into the array.
        (negdi2 splitter): Ditto with split_di.
        (movdfcc splitter):  Pass arrays of 2 operands to split_di instead of
        two separate calls with single member arrays.  Swap match_dup operands
        6 and 7 to better fit into the array.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134403 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.md

index 26258e4..89983b9 100644 (file)
@@ -1,3 +1,18 @@
+2008-04-17  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (addti3 splitter): Pass arrays of 3 operands
+       to split_ti instead of three separate calls with single member arrays.
+       (subti3 splitter): Ditto.
+       (adddi3 splitter): Ditto with split_di.
+       (subdi3 splitter): Ditto.
+       (negti2 splitter): Pass arrays of 2 operands to split_ti instead of
+       two separate calls with single member arrays.  Swap match_dup
+       operands 1 and 2 to better fit into the array.
+       (negdi2 splitter): Ditto with split_di.
+       (movdfcc splitter):  Pass arrays of 2 operands to split_di instead of
+       two separate calls with single member arrays.  Swap match_dup operands
+       6 and 7 to better fit into the array.
+
 2008-04-17  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/i386/i386.c (sse_builtin_type): New.
index d09eb26..102f7f7 100644 (file)
    && !x86_64_immediate_operand (operands[1], DImode) && 1"
   [(set (match_dup 0) (match_dup 1))
    (set (match_dup 2) (match_dup 3))]
-  "split_di (operands + 1, 1, operands + 2, operands + 3);
+  "split_di (&operands[1], 1, &operands[2], &operands[3]);
    operands[1] = gen_lowpart (DImode, operands[2]);
    operands[2] = gen_rtx_MEM (SImode, gen_rtx_PLUS (DImode, stack_pointer_rtx,
                                                    GEN_INT (4)));
    && !x86_64_immediate_operand (operands[1], DImode)"
   [(set (match_dup 0) (match_dup 1))
    (set (match_dup 2) (match_dup 3))]
-  "split_di (operands + 1, 1, operands + 2, operands + 3);
+  "split_di (&operands[1], 1, &operands[2], &operands[3]);
    operands[1] = gen_lowpart (DImode, operands[2]);
    operands[2] = gen_rtx_MEM (SImode, gen_rtx_PLUS (DImode, stack_pointer_rtx,
                                                    GEN_INT (4)));
    && !x86_64_immediate_operand (operands[1], DImode) && 1"
   [(set (match_dup 2) (match_dup 3))
    (set (match_dup 4) (match_dup 5))]
-  "split_di (operands, 2, operands + 2, operands + 4);")
+  "split_di (&operands[0], 2, &operands[2], &operands[4]);")
 
 (define_split
   [(set (match_operand:DI 0 "memory_operand" "")
    && !x86_64_immediate_operand (operands[1], DImode)"
   [(set (match_dup 2) (match_dup 3))
    (set (match_dup 4) (match_dup 5))]
-  "split_di (operands, 2, operands + 2, operands + 4);")
+  "split_di (&operands[0], 2, &operands[2], &operands[4]);")
 
 (define_insn "*swapdi_rex64"
   [(set (match_operand:DI 0 "register_operand" "+r")
                                     (match_dup 4))
                            (match_dup 5)))
              (clobber (reg:CC FLAGS_REG))])]
-  "split_ti (operands+0, 1, operands+0, operands+3);
-   split_ti (operands+1, 1, operands+1, operands+4);
-   split_ti (operands+2, 1, operands+2, operands+5);")
+  "split_ti (&operands[0], 3, &operands[0], &operands[3]);")
 
 ;; %%% splits for addsidi3
 ;  [(set (match_operand:DI 0 "nonimmediate_operand" "")
                                     (match_dup 4))
                            (match_dup 5)))
              (clobber (reg:CC FLAGS_REG))])]
-  "split_di (operands+0, 1, operands+0, operands+3);
-   split_di (operands+1, 1, operands+1, operands+4);
-   split_di (operands+2, 1, operands+2, operands+5);")
+  "split_di (&operands[0], 3, &operands[0], &operands[3]);")
 
 (define_insn "adddi3_carry_rex64"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=rm,r")
                             (plus:DI (ltu:DI (reg:CC FLAGS_REG) (const_int 0))
                                      (match_dup 5))))
              (clobber (reg:CC FLAGS_REG))])]
-  "split_ti (operands+0, 1, operands+0, operands+3);
-   split_ti (operands+1, 1, operands+1, operands+4);
-   split_ti (operands+2, 1, operands+2, operands+5);")
+  "split_ti (&operands[0], 3, &operands[0], &operands[3]);")
 
 ;; %%% splits for subsidi3
 
                             (plus:SI (ltu:SI (reg:CC FLAGS_REG) (const_int 0))
                                      (match_dup 5))))
              (clobber (reg:CC FLAGS_REG))])]
-  "split_di (operands+0, 1, operands+0, operands+3);
-   split_di (operands+1, 1, operands+1, operands+4);
-   split_di (operands+2, 1, operands+2, operands+5);")
+  "split_di (&operands[0], 3, &operands[0], &operands[3]);")
 
 (define_insn "subdi3_carry_rex64"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=rm,r")
   "TARGET_64BIT && reload_completed"
   [(parallel
     [(set (reg:CCZ FLAGS_REG)
-         (compare:CCZ (neg:DI (match_dup 2)) (const_int 0)))
-     (set (match_dup 0) (neg:DI (match_dup 2)))])
+         (compare:CCZ (neg:DI (match_dup 1)) (const_int 0)))
+     (set (match_dup 0) (neg:DI (match_dup 1)))])
    (parallel
-    [(set (match_dup 1)
+    [(set (match_dup 2)
          (plus:DI (plus:DI (ltu:DI (reg:CC FLAGS_REG) (const_int 0))
                            (match_dup 3))
                   (const_int 0)))
      (clobber (reg:CC FLAGS_REG))])
    (parallel
-    [(set (match_dup 1)
-         (neg:DI (match_dup 1)))
+    [(set (match_dup 2)
+         (neg:DI (match_dup 2)))
      (clobber (reg:CC FLAGS_REG))])]
-  "split_ti (operands+1, 1, operands+2, operands+3);
-   split_ti (operands+0, 1, operands+0, operands+1);")
+  "split_ti (&operands[0], 2, &operands[0], &operands[2]);")
 
 (define_expand "negdi2"
   [(parallel [(set (match_operand:DI 0 "nonimmediate_operand" "")
   "!TARGET_64BIT && reload_completed"
   [(parallel
     [(set (reg:CCZ FLAGS_REG)
-         (compare:CCZ (neg:SI (match_dup 2)) (const_int 0)))
-     (set (match_dup 0) (neg:SI (match_dup 2)))])
+         (compare:CCZ (neg:SI (match_dup 1)) (const_int 0)))
+     (set (match_dup 0) (neg:SI (match_dup 1)))])
    (parallel
-    [(set (match_dup 1)
+    [(set (match_dup 2)
          (plus:SI (plus:SI (ltu:SI (reg:CC FLAGS_REG) (const_int 0))
                            (match_dup 3))
                   (const_int 0)))
      (clobber (reg:CC FLAGS_REG))])
    (parallel
-    [(set (match_dup 1)
-         (neg:SI (match_dup 1)))
+    [(set (match_dup 2)
+         (neg:SI (match_dup 2)))
      (clobber (reg:CC FLAGS_REG))])]
-  "split_di (operands+1, 1, operands+2, operands+3);
-   split_di (operands+0, 1, operands+0, operands+1);")
+  "split_di (&operands[0], 2, &operands[0], &operands[2]);");
 
 (define_insn "*negdi2_1_rex64"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=rm")
                  (lshiftrt:SI (match_dup 3)
                               (minus:QI (const_int 32) (match_dup 2)))))
     (clobber (reg:CC FLAGS_REG))])]
- "split_di (operands, 1, operands + 4, operands + 5);")
+ "split_di (&operands[0], 1, &operands[4], &operands[5]);")
 
 (define_insn "*rotlsi3_1_one_bit_rex64"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=rm")
                  (ashift:SI (match_dup 3)
                             (minus:QI (const_int 32) (match_dup 2)))))
     (clobber (reg:CC FLAGS_REG))])]
- "split_di (operands, 1, operands + 4, operands + 5);")
+ "split_di (&operands[0], 1, &operands[4], &operands[5]);")
 
 (define_insn "*rotrdi3_1_one_bit_rex64"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=rm")
   [(set (match_dup 2)
        (if_then_else:SI (match_op_dup 1 [(match_dup 4) (const_int 0)])
                      (match_dup 5)
-                     (match_dup 7)))
+                     (match_dup 6)))
    (set (match_dup 3)
        (if_then_else:SI (match_op_dup 1 [(match_dup 4) (const_int 0)])
-                     (match_dup 6)
+                     (match_dup 7)
                      (match_dup 8)))]
-  "split_di (operands+2, 1, operands+5, operands+6);
-   split_di (operands+3, 1, operands+7, operands+8);
-   split_di (operands, 1, operands+2, operands+3);")
+  "split_di (&operands[2], 2, &operands[5], &operands[7]);
+   split_di (&operands[0], 1, &operands[2], &operands[3]);")
 
 (define_insn "*movxfcc_1"
   [(set (match_operand:XF 0 "register_operand" "=f,f")