Implement bswaphi2 with rev16 (AArch64)
[gcc.git] / gcc / config / aarch64 / aarch64.md
index 5c96c8925da36e335796376e128da4af887d09b3..17f024fa40f46cee2ce63b40ea67a7269c1e482e 100644 (file)
    (set_attr "mode" "<MODE>")]
 )
 
+(define_insn "bswaphi2"
+  [(set (match_operand:HI 0 "register_operand" "=r")
+        (bswap:HI (match_operand:HI 1 "register_operand" "r")))]
+  ""
+  "rev16\\t%w0, %w1"
+  [(set_attr "v8type" "rev")
+   (set_attr "mode" "HI")]
+)
+
 ;; -------------------------------------------------------------------
 ;; Floating-point intrinsics
 ;; -------------------------------------------------------------------