Commit b81f1ee3 by James Greenhalgh Committed by James Greenhalgh

[Patch 1/2 AArch64/ARM] Give AArch64 ROR (Immediate) a new type attribute

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
parent 6d259b8d
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> 2015-09-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/67481 PR rtl-optimization/67481
...@@ -3807,13 +3807,13 @@ ...@@ -3807,13 +3807,13 @@
;; Rotate right ;; Rotate right
(define_insn "*ror<mode>3_insn" (define_insn "*ror<mode>3_insn"
[(set (match_operand:GPI 0 "register_operand" "=r") [(set (match_operand:GPI 0 "register_operand" "=r,r")
(rotatert:GPI (rotatert:GPI
(match_operand:GPI 1 "register_operand" "r") (match_operand:GPI 1 "register_operand" "r,r")
(match_operand:QI 2 "aarch64_reg_or_shift_imm_<mode>" "rUs<cmode>")))] (match_operand:QI 2 "aarch64_reg_or_shift_imm_<mode>" "r,Us<cmode>")))]
"" ""
"ror\\t%<w>0, %<w>1, %<w>2" "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 ;; zero_extend version of above
...@@ -3902,7 +3902,7 @@ ...@@ -3902,7 +3902,7 @@
operands[3] = GEN_INT (<sizen> - UINTVAL (operands[2])); operands[3] = GEN_INT (<sizen> - UINTVAL (operands[2]));
return "ror\\t%<w>0, %<w>1, %3"; return "ror\\t%<w>0, %<w>1, %3";
} }
[(set_attr "type" "shift_imm")] [(set_attr "type" "rotate_imm")]
) )
;; zero_extend version of the above ;; zero_extend version of the above
...@@ -3916,7 +3916,7 @@ ...@@ -3916,7 +3916,7 @@
operands[3] = GEN_INT (32 - UINTVAL (operands[2])); operands[3] = GEN_INT (32 - UINTVAL (operands[2]));
return "ror\\t%w0, %w1, %3"; 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>" (define_insn "*<ANY_EXTEND:optab><GPI:mode>_ashl<SHORT:mode>"
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
(define_insn_reservation "thunderx_shift" 1 (define_insn_reservation "thunderx_shift" 1
(and (eq_attr "tune" "thunderx") (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") "thunderx_pipe0 | thunderx_pipe1")
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
alu_sreg,alus_sreg,logic_reg,logics_reg,\ alu_sreg,alus_sreg,logic_reg,logics_reg,\
adc_imm,adcs_imm,adc_reg,adcs_reg,\ adc_imm,adcs_imm,adc_reg,adcs_reg,\
adr,bfm,csel,clz,rbit,rev,alu_dsp_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,\ mov_imm,mov_reg,mvn_imm,mvn_reg,\
mrs,multiple,no_insn")) mrs,multiple,no_insn"))
"cortex_a53_slot_any") "cortex_a53_slot_any")
......
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
alu_sreg,alus_sreg,logic_reg,logics_reg,\ alu_sreg,alus_sreg,logic_reg,logics_reg,\
adc_imm,adcs_imm,adc_reg,adcs_reg,\ adc_imm,adcs_imm,adc_reg,adcs_reg,\
adr,bfm,clz,rbit,rev,alu_dsp_reg,\ adr,bfm,clz,rbit,rev,alu_dsp_reg,\
shift_imm,shift_reg,\ rotate_imm,shift_imm,shift_reg,\
mov_imm,mov_reg,\ mov_imm,mov_reg,\
mvn_imm,mvn_reg,\ mvn_imm,mvn_reg,\
mrs,multiple,no_insn")) mrs,multiple,no_insn"))
......
...@@ -120,6 +120,7 @@ ...@@ -120,6 +120,7 @@
; final output, thus having no impact on scheduling. ; final output, thus having no impact on scheduling.
; rbit reverse bits. ; rbit reverse bits.
; rev reverse bytes. ; rev reverse bytes.
; rotate_imm rotate by immediate.
; sdiv signed division. ; sdiv signed division.
; shift_imm simple shift operation (LSL, LSR, ASR, ROR) with an ; shift_imm simple shift operation (LSL, LSR, ASR, ROR) with an
; immediate. ; immediate.
...@@ -627,6 +628,7 @@ ...@@ -627,6 +628,7 @@
nop,\ nop,\
rbit,\ rbit,\
rev,\ rev,\
rotate_imm,\
sdiv,\ sdiv,\
shift_imm,\ shift_imm,\
shift_reg,\ shift_reg,\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment