[Patch 1/2 AArch64/ARM] Give AArch64 ROR (Immediate) a new type attribute
authorJames Greenhalgh <james.greenhalgh@arm.com>
Mon, 28 Sep 2015 09:35:46 +0000 (09:35 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Mon, 28 Sep 2015 09:35:46 +0000 (09:35 +0000)
gcc/

* config/arm/types.md (type): Add rotate_imm.
* config/aarch64/aarch64.md (*ror<mode>3_insn): Split out the
ROR immediate case.
(*rorsi3_insn_uxtw): Likewise.
* config/aarch64/thunderx.md (thunderx_shift): Add rotate_imm.
* config/arm/cortex-a53.md (cortex_a53_alu_shift): Add rotate_imm.
* config/arm/cortex-a57.md (cortex_a53_alu): Add rotate_imm.

From-SVN: r228197

gcc/ChangeLog
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/thunderx.md
gcc/config/arm/cortex-a53.md
gcc/config/arm/cortex-a57.md
gcc/config/arm/types.md

index 32875dfca7206d76d415b9bf5006cb1d1738477f..e066bd76b82319b1b7921afea9b7d83c8b39dbfd 100644 (file)
@@ -1,3 +1,13 @@
+2015-09-28  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       * config/arm/types.md (type): Add rotate_imm.
+       * config/aarch64/aarch64.md (*ror<mode>3_insn): Split out the
+       ROR immediate case.
+       (*rorsi3_insn_uxtw): Likewise.
+       * config/aarch64/thunderx.md (thunderx_shift): Add rotate_imm.
+       * config/arm/cortex-a53.md (cortex_a53_alu_shift): Add rotate_imm.
+       * config/arm/cortex-a57.md (cortex_a53_alu): Add rotate_imm.
+
 2015-09-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        PR rtl-optimization/67481
index 3e8520905b7a425690e5a831600bccfea85f81f0..e5179dd2bbb393fd32e565ae792b7a6b78a83bd0 100644 (file)
 
 ;; Rotate right
 (define_insn "*ror<mode>3_insn"
-  [(set (match_operand:GPI 0 "register_operand" "=r")
-        (rotatert:GPI
-          (match_operand:GPI 1 "register_operand" "r")
-          (match_operand:QI 2 "aarch64_reg_or_shift_imm_<mode>" "rUs<cmode>")))]
+  [(set (match_operand:GPI 0 "register_operand" "=r,r")
+     (rotatert:GPI
+       (match_operand:GPI 1 "register_operand" "r,r")
+       (match_operand:QI 2 "aarch64_reg_or_shift_imm_<mode>" "r,Us<cmode>")))]
   ""
   "ror\\t%<w>0, %<w>1, %<w>2"
-  [(set_attr "type" "shift_reg")]
+  [(set_attr "type" "shift_reg, rotate_imm")]
 )
 
 ;; zero_extend version of above
   operands[3] = GEN_INT (<sizen> - UINTVAL (operands[2]));
   return "ror\\t%<w>0, %<w>1, %3";
 }
-  [(set_attr "type" "shift_imm")]
+  [(set_attr "type" "rotate_imm")]
 )
 
 ;; zero_extend version of the above
   operands[3] = GEN_INT (32 - UINTVAL (operands[2]));
   return "ror\\t%w0, %w1, %3";
 }
-  [(set_attr "type" "shift_imm")]
+  [(set_attr "type" "rotate_imm")]
 )
 
 (define_insn "*<ANY_EXTEND:optab><GPI:mode>_ashl<SHORT:mode>"
index cf9636862f21a547a7b9e6c1147c72a79a8d9009..3dae963fc910156988d4be98e45f745be545afeb 100644 (file)
@@ -39,7 +39,7 @@
 
 (define_insn_reservation "thunderx_shift" 1
   (and (eq_attr "tune" "thunderx")
-       (eq_attr "type" "bfm,extend,shift_imm,shift_reg,rbit,rev"))
+       (eq_attr "type" "bfm,extend,rotate_imm,shift_imm,shift_reg,rbit,rev"))
   "thunderx_pipe0 | thunderx_pipe1")
 
 
index db572f68052979ded61d1d8cf7a705a60ce65ff8..3fa0625c130675a87a30f2a1345e20fc426e03c8 100644 (file)
@@ -76,7 +76,7 @@
                         alu_sreg,alus_sreg,logic_reg,logics_reg,\
                         adc_imm,adcs_imm,adc_reg,adcs_reg,\
                         adr,bfm,csel,clz,rbit,rev,alu_dsp_reg,\
-                        shift_imm,shift_reg,\
+                        rotate_imm,shift_imm,shift_reg,\
                         mov_imm,mov_reg,mvn_imm,mvn_reg,\
                         mrs,multiple,no_insn"))
   "cortex_a53_slot_any")
index a32c848756b0af783463265f2c29a4fb1170ec72..d6ce4402125fcf168f46ec7d0e42debc5309eccf 100644 (file)
                        alu_sreg,alus_sreg,logic_reg,logics_reg,\
                        adc_imm,adcs_imm,adc_reg,adcs_reg,\
                        adr,bfm,clz,rbit,rev,alu_dsp_reg,\
-                       shift_imm,shift_reg,\
+                       rotate_imm,shift_imm,shift_reg,\
                        mov_imm,mov_reg,\
                        mvn_imm,mvn_reg,\
                        mrs,multiple,no_insn"))
index ec609aeaed195a4500d6a11a9484847570a6b81d..534be74fe466846bba5bc0d80ea8d1cb41b71f4b 100644 (file)
 ;                    final output, thus having no impact on scheduling.
 ; rbit               reverse bits.
 ; rev                reverse bytes.
+; rotate_imm         rotate by immediate.
 ; sdiv               signed division.
 ; shift_imm          simple shift operation (LSL, LSR, ASR, ROR) with an
 ;                    immediate.
   nop,\
   rbit,\
   rev,\
+  rotate_imm,\
   sdiv,\
   shift_imm,\
   shift_reg,\