pa.md (integer_indexed_store splitters): Use mem_shadd_operand.
authorJeff Law <law@redhat.com>
Fri, 22 May 2015 20:17:09 +0000 (14:17 -0600)
committerJeff Law <law@gcc.gnu.org>
Fri, 22 May 2015 20:17:09 +0000 (14:17 -0600)
* config/pa/pa.md (integer_indexed_store splitters): Use
mem_shadd_operand.  Use ASHIFT rather than MULT in the resulting
insns -- adjusting the constant 2nd operand accordingly.

From-SVN: r223586

gcc/ChangeLog
gcc/config/pa/pa.md

index a6f06d9dfe31ca4fd4c987a521672bf6cc673ae1..769c7b5e58f08157b0fbf1703b2d5971abe1b0ed 100644 (file)
@@ -1,5 +1,9 @@
 2015-05-22  Jeff Law  <law@redhat.com>
 
+       * config/pa/pa.md (integer_indexed_store splitters): Use
+       mem_shadd_operand.  Use ASHIFT rather than MULT in the resulting
+       insns -- adjusting the constant 2nd operand accordingly.
+
        * combine.c (try_combine): Canonicalize (plus (mult X pow2) Y) into
        (plus (ashift X log2) Y) if it is a split point.
 
index aaec27d985e773497dcba6ab4e55956fd552e477..6cc7a3cf054f4f1d618500939e38bf65757e0add 100644 (file)
 ;; a 2 insn store with some creative RTL rewriting.
 (define_split
   [(set (mem:SI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "")
-                              (match_operand:SI 1 "shadd_operand" ""))
+                              (match_operand:SI 1 "mem_shadd_operand" ""))
                   (plus:SI (match_operand:SI 2 "register_operand" "")
                            (match_operand:SI 3 "const_int_operand" ""))))
        (match_operand:SI 4 "register_operand" ""))
    (clobber (match_operand:SI 5 "register_operand" ""))]
   ""
-  [(set (match_dup 5) (plus:SI (mult:SI (match_dup 0) (match_dup 1))
+  [(set (match_dup 5) (plus:SI (ashift:SI (match_dup 0) (match_dup 1))
                               (match_dup 2)))
    (set (mem:SI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))]
-  "")
+  "
+{
+  operands[1] = GEN_INT (exact_log2 (INTVAL (operands[1])));
+
+}")
 
 (define_split
   [(set (mem:HI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "")
-                              (match_operand:SI 1 "shadd_operand" ""))
+                              (match_operand:SI 1 "mem_shadd_operand" ""))
                   (plus:SI (match_operand:SI 2 "register_operand" "")
                            (match_operand:SI 3 "const_int_operand" ""))))
        (match_operand:HI 4 "register_operand" ""))
    (clobber (match_operand:SI 5 "register_operand" ""))]
   ""
-  [(set (match_dup 5) (plus:SI (mult:SI (match_dup 0) (match_dup 1))
+  [(set (match_dup 5) (plus:SI (ashift:SI (match_dup 0) (match_dup 1))
                               (match_dup 2)))
    (set (mem:HI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))]
-  "")
+  "
+{
+  operands[1] = GEN_INT (exact_log2 (INTVAL (operands[1])));
+
+}")
 
 (define_split
   [(set (mem:QI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "")
-                              (match_operand:SI 1 "shadd_operand" ""))
+                              (match_operand:SI 1 "mem_shadd_operand" ""))
                   (plus:SI (match_operand:SI 2 "register_operand" "")
                            (match_operand:SI 3 "const_int_operand" ""))))
        (match_operand:QI 4 "register_operand" ""))
    (clobber (match_operand:SI 5 "register_operand" ""))]
   ""
-  [(set (match_dup 5) (plus:SI (mult:SI (match_dup 0) (match_dup 1))
+  [(set (match_dup 5) (plus:SI (ashift:SI (match_dup 0) (match_dup 1))
                               (match_dup 2)))
    (set (mem:QI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))]
-  "")
+  "
+{
+  operands[1] = GEN_INT (exact_log2 (INTVAL (operands[1])));
+
+}")
 
 (define_expand "movhi"
   [(set (match_operand:HI 0 "general_operand" "")