rs6000.md (*neg<mode>2_internal): Delete.
authorSegher Boessenkool <segher@kernel.crashing.org>
Sun, 21 Sep 2014 17:59:40 +0000 (19:59 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Sun, 21 Sep 2014 17:59:40 +0000 (19:59 +0200)
2014-09-21  Segher Boessenkool  <segher@kernel.crashing.org>

* config/rs6000/rs6000.md (*neg<mode>2_internal): Delete.
(two anonymous define_insn and two define_split): Delete.
(*neg<mode>2, *neg<mode>2_dot, *neg<mode>2_dot2): New.

From-SVN: r215432

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index 35159c54fe9029f6a13dd684a95bc696414ced9a..b3aa885c7605df57fecc229d8a01c7d9c4382ef8 100644 (file)
@@ -1,3 +1,9 @@
+2014-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       * config/rs6000/rs6000.md (*neg<mode>2_internal): Delete.
+       (two anonymous define_insn and two define_split): Delete.
+       (*neg<mode>2, *neg<mode>2_dot, *neg<mode>2_dot2): New.
+
 2014-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/rs6000.md (*one_cmpl<mode>2): Generate "not" insn.
index 332b7dcc7c63692407debdd4be6787fe7ba59a57..48cc73deb9e830178cf2c915e0ff74b6fa4763af 100644 (file)
     }
 }")
 
+
 (define_expand "neg<mode>2"
   [(set (match_operand:SDI 0 "gpc_reg_operand" "")
        (neg:SDI (match_operand:SDI 1 "gpc_reg_operand" "")))]
   ""
   "")
 
-(define_insn "*neg<mode>2_internal"
+(define_insn "*neg<mode>2"
   [(set (match_operand:GPR 0 "gpc_reg_operand" "=r")
        (neg:GPR (match_operand:GPR 1 "gpc_reg_operand" "r")))]
   ""
   "neg %0,%1"
   [(set_attr "type" "add")])
 
-(define_insn ""
-  [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")
-       (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "r,r"))
+(define_insn_and_split "*neg<mode>2_dot"
+  [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")
+       (compare:CC (neg:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r"))
                    (const_int 0)))
-   (clobber (match_scratch:P 2 "=r,r"))]
-  ""
+   (clobber (match_scratch:GPR 0 "=r,r"))]
+  "<MODE>mode == Pmode"
   "@
-   neg. %2,%1
+   neg. %0,%1
    #"
+  "&& reload_completed && cc_reg_not_cr0_operand (operands[2], CCmode)"
+  [(set (match_dup 0)
+       (neg:GPR (match_dup 1)))
+   (set (match_dup 2)
+       (compare:CC (match_dup 0)
+                   (const_int 0)))]
+  ""
   [(set_attr "type" "add")
    (set_attr "dot" "yes")
    (set_attr "length" "4,8")])
 
-(define_split
-  [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")
-       (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" ""))
-                   (const_int 0)))
-   (clobber (match_scratch:P 2 ""))]
-  "reload_completed"
-  [(set (match_dup 2)
-       (neg:P (match_dup 1)))
-   (set (match_dup 0)
-       (compare:CC (match_dup 2)
-                   (const_int 0)))]
-  "")
-
-(define_insn ""
+(define_insn_and_split "*neg<mode>2_dot2"
   [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")
-       (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" "r,r"))
+       (compare:CC (neg:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r"))
                    (const_int 0)))
-   (set (match_operand:P 0 "gpc_reg_operand" "=r,r")
-       (neg:P (match_dup 1)))]
-  ""
+   (set (match_operand:GPR 0 "gpc_reg_operand" "=r,r")
+       (neg:GPR (match_dup 1)))]
+  "<MODE>mode == Pmode"
   "@
    neg. %0,%1
    #"
-  [(set_attr "type" "add")
-   (set_attr "dot" "yes")
-   (set_attr "length" "4,8")])
-
-(define_split
-  [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")
-       (compare:CC (neg:P (match_operand:P 1 "gpc_reg_operand" ""))
-                   (const_int 0)))
-   (set (match_operand:P 0 "gpc_reg_operand" "")
-       (neg:P (match_dup 1)))]
-  "reload_completed"
+  "&& reload_completed && cc_reg_not_cr0_operand (operands[2], CCmode)"
   [(set (match_dup 0)
-       (neg:P (match_dup 1)))
+       (neg:GPR (match_dup 1)))
    (set (match_dup 2)
        (compare:CC (match_dup 0)
                    (const_int 0)))]
-  "")
+  ""
+  [(set_attr "type" "add")
+   (set_attr "dot" "yes")
+   (set_attr "length" "4,8")])
+
 
 (define_insn "clz<mode>2"
   [(set (match_operand:GPR 0 "gpc_reg_operand" "=r")