[PATCH][AArch64] Improve spill code - swap order in shl pattern
authorWilco Dijkstra <wdijkstr@arm.com>
Mon, 27 Jul 2015 15:02:55 +0000 (15:02 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Mon, 27 Jul 2015 15:02:55 +0000 (15:02 +0000)
gcc/

* config/aarch64/aarch64.md (aarch64_ashl_sisd_or_int_<mode>3):
Place integer variant first.

From-SVN: r226247

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

index 0a9ae7fef8813c60a80f90a6d37111b92b832cbc..00b9b99fa9de629cda4cdcc37f6ae5e0d9f3e8fe 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-27  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       * config/aarch64/aarch64.md (aarch64_ashl_sisd_or_int_<mode>3):
+       Place integer variant first.
+
 2015-07-27  Matthew Wahab  <matthew.wahab@arm.com>
 
        * config/arm/arm-arches.def: Add "armv6kz". Replace 6ZK with 6KZ
index f264534141088955165174df5e92f964d92e6d6c..65e4c66264c474f29cab7b34a929b6363516d4e8 100644 (file)
 
 ;; Logical left shift using SISD or Integer instruction
 (define_insn "*aarch64_ashl_sisd_or_int_<mode>3"
-  [(set (match_operand:GPI 0 "register_operand" "=w,w,r")
+  [(set (match_operand:GPI 0 "register_operand" "=r,w,w")
         (ashift:GPI
-          (match_operand:GPI 1 "register_operand" "w,w,r")
-          (match_operand:QI 2 "aarch64_reg_or_shift_imm_<mode>" "Us<cmode>,w,rUs<cmode>")))]
+          (match_operand:GPI 1 "register_operand" "r,w,w")
+          (match_operand:QI 2 "aarch64_reg_or_shift_imm_<mode>" "rUs<cmode>,Us<cmode>,w")))]
   ""
   "@
+   lsl\t%<w>0, %<w>1, %<w>2
    shl\t%<rtn>0<vas>, %<rtn>1<vas>, %2
-   ushl\t%<rtn>0<vas>, %<rtn>1<vas>, %<rtn>2<vas>
-   lsl\t%<w>0, %<w>1, %<w>2"
-  [(set_attr "simd" "yes,yes,no")
-   (set_attr "type" "neon_shift_imm<q>, neon_shift_reg<q>,shift_reg")]
+   ushl\t%<rtn>0<vas>, %<rtn>1<vas>, %<rtn>2<vas>"
+  [(set_attr "simd" "no,yes,yes")
+   (set_attr "type" "shift_reg,neon_shift_imm<q>, neon_shift_reg<q>")]
 )
 
 ;; Logical right shift using SISD or Integer instruction