[AArch64 2/3] Add SIMD-reg variants of logical operators and/ior/xor/not
authorAlan Lawrence <alan.lawrence@arm.com>
Fri, 19 Dec 2014 17:48:15 +0000 (17:48 +0000)
committerAlan Lawrence <alalaw01@gcc.gnu.org>
Fri, 19 Dec 2014 17:48:15 +0000 (17:48 +0000)
* config/aarch64/aarch64.md (<optab><mode>3, one_cmpl<mode>2):
Add SIMD-register variant.
* config/aarch64/iterators.md (Vbtype): Add value for SI.

From-SVN: r218960

gcc/ChangeLog
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/iterators.md

index f27d69869614667bcf7b4694d69cbd043058ad6b..10b5538cd60156e801b6a28f9c37071fa1ee834b 100644 (file)
@@ -1,3 +1,9 @@
+2014-12-19  Alan Lawrence  <alan.lawrence@arm.com>
+
+       * config/aarch64/aarch64.md (<optab><mode>3, one_cmpl<mode>2):
+       Add SIMD-register variant.
+       * config/aarch64/iterators.md (Vbtype): Add value for SI.
+
 2014-12-19  Alan Lawrence  <alan.lawrence@arm.com>
 
        * config/aarch64/aarch64.md (subdi3, adddi3_aarch64): Don't penalize
index 3e8434602b99527a41875ebeb319787ab875a887..bc9138d6cf9331f94ad03281545517d5741ea8d6 100644 (file)
 ;; -------------------------------------------------------------------
 
 (define_insn "<optab><mode>3"
-  [(set (match_operand:GPI 0 "register_operand" "=r,rk")
-       (LOGICAL:GPI (match_operand:GPI 1 "register_operand" "%r,r")
-                    (match_operand:GPI 2 "aarch64_logical_operand" "r,<lconst>")))]
+  [(set (match_operand:GPI 0 "register_operand" "=r,rk,w")
+       (LOGICAL:GPI (match_operand:GPI 1 "register_operand" "%r,r,w")
+                    (match_operand:GPI 2 "aarch64_logical_operand" "r,<lconst>,w")))]
   ""
-  "<logical>\\t%<w>0, %<w>1, %<w>2"
-  [(set_attr "type" "logic_reg,logic_imm")]
+  "@
+  <logical>\\t%<w>0, %<w>1, %<w>2
+  <logical>\\t%<w>0, %<w>1, %<w>2
+  <logical>\\t%0.<Vbtype>, %1.<Vbtype>, %2.<Vbtype>"
+  [(set_attr "type" "logic_reg,logic_imm,neon_logic")
+   (set_attr "simd" "*,*,yes")]
 )
 
 ;; zero_extend version of above
 )
 
 (define_insn "one_cmpl<mode>2"
-  [(set (match_operand:GPI 0 "register_operand" "=r")
-       (not:GPI (match_operand:GPI 1 "register_operand" "r")))]
+  [(set (match_operand:GPI 0 "register_operand" "=r,w")
+       (not:GPI (match_operand:GPI 1 "register_operand" "r,w")))]
   ""
-  "mvn\\t%<w>0, %<w>1"
-  [(set_attr "type" "logic_reg")]
+  "@
+  mvn\\t%<w>0, %<w>1
+  mvn\\t%0.8b, %1.8b"
+  [(set_attr "type" "logic_reg,neon_logic")
+   (set_attr "simd" "*,yes")]
 )
 
 (define_insn "*one_cmpl_<optab><mode>2"
index 16a2647cc60fbd13945ee73671d15453a56773fa..26e3ebcbcabbf224eb05b1b31d8a814e4e992f0d 100644 (file)
                          (V2SI "8b") (V4SI  "16b")
                          (V2DI "16b") (V2SF  "8b")
                          (V4SF "16b") (V2DF  "16b")
-                         (DI   "8b")  (DF    "8b")])
+                         (DI   "8b")  (DF    "8b")
+                         (SI   "8b")])
 
 ;; Define element mode for each vector mode.
 (define_mode_attr VEL [(V8QI "QI") (V16QI "QI")