s390.md (movdi, [...]): Add peepholes2 to pull operands out of the literal pool where possible.

* config/s390/s390.md (movdi, movsi, movhi, movqi): Add peepholes2
	to pull operands out of the literal pool where possible.

From-SVN: r58504
This commit is contained in:
Ulrich Weigand 2002-10-24 20:19:10 +00:00 committed by Ulrich Weigand
parent d074905352
commit 84817c5d5b
2 changed files with 45 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-10-24 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.md (movdi, movsi, movhi, movqi): Add peepholes2
to pull operands out of the literal pool where possible.
2002-10-24 Denis Chertykov <denisc@overta.ru>
* config/avr/avr.c (init_cumulative_args): Test fntype for zero.

View File

@ -992,6 +992,18 @@
operands[1] = replace_equiv_address (operands[1], addr);
}")
(define_peephole2
[(set (match_operand:DI 0 "register_operand" "")
(mem:DI (match_operand 1 "address_operand" "")))]
"TARGET_64BIT
&& !FP_REG_P (operands[0])
&& GET_CODE (operands[1]) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (operands[1])
&& get_pool_mode (operands[1]) == DImode
&& legitimate_reload_constant_p (get_pool_constant (operands[1]))"
[(set (match_dup 0) (match_dup 2))]
"operands[2] = get_pool_constant (operands[1]);")
;
; movsi instruction pattern(s).
;
@ -1074,6 +1086,16 @@
[(set_attr "op_type" "RR,RX,RX,RR,RX,RX,SS")
(set_attr "atype" "reg,mem,mem,reg,mem,mem,mem")])
(define_peephole2
[(set (match_operand:SI 0 "register_operand" "")
(mem:SI (match_operand 1 "address_operand" "")))]
"!FP_REG_P (operands[0])
&& GET_CODE (operands[1]) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (operands[1])
&& get_pool_mode (operands[1]) == SImode
&& legitimate_reload_constant_p (get_pool_constant (operands[1]))"
[(set (match_dup 0) (match_dup 2))]
"operands[2] = get_pool_constant (operands[1]);")
;
; movhi instruction pattern(s).
@ -1092,6 +1114,15 @@
[(set_attr "op_type" "RR,RI,RX,RX,SS")
(set_attr "atype" "reg,reg,mem,mem,mem")])
(define_peephole2
[(set (match_operand:HI 0 "register_operand" "")
(mem:HI (match_operand 1 "address_operand" "")))]
"GET_CODE (operands[1]) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (operands[1])
&& get_pool_mode (operands[1]) == HImode
&& GET_CODE (get_pool_constant (operands[1])) == CONST_INT"
[(set (match_dup 0) (match_dup 2))]
"operands[2] = get_pool_constant (operands[1]);")
;
; movqi instruction pattern(s).
@ -1126,6 +1157,15 @@
[(set_attr "op_type" "RR,RI,RX,RX,SI,SS")
(set_attr "atype" "reg,reg,mem,mem,mem,mem")])
(define_peephole2
[(set (match_operand:QI 0 "nonimmediate_operand" "")
(mem:QI (match_operand 1 "address_operand" "")))]
"GET_CODE (operands[1]) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (operands[1])
&& get_pool_mode (operands[1]) == QImode
&& GET_CODE (get_pool_constant (operands[1])) == CONST_INT"
[(set (match_dup 0) (match_dup 2))]
"operands[2] = get_pool_constant (operands[1]);")
;
; movstrictqi instruction pattern(s).