m68hc11.md (peephole2): New peephole2 to optimize address computations.
* config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize address computations. From-SVN: r47323
This commit is contained in:
parent
259ed6e270
commit
4f81fba13e
|
@ -1,3 +1,8 @@
|
|||
2001-11-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
|
||||
|
||||
* config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize
|
||||
address computations.
|
||||
|
||||
2001-11-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
|
||||
|
||||
* config/m68hc11/m68hc11.c (d_register_operand): Must accept
|
||||
|
|
|
@ -6102,6 +6102,32 @@
|
|||
;;- Peepholes
|
||||
;;--------------------------------------------------------------------
|
||||
|
||||
;;
|
||||
;; Reorganize to optimize address computations.
|
||||
;;
|
||||
(define_peephole2
|
||||
[(set (match_operand:HI 0 "hard_reg_operand" "")
|
||||
(match_operand:HI 1 "const_int_operand" ""))
|
||||
(set (match_dup 0)
|
||||
(plus:HI (match_dup 0)
|
||||
(match_operand:HI 2 "general_operand" "")))]
|
||||
"(INTVAL (operands[1]) >= -2 && INTVAL (operands[1]) <= 2)"
|
||||
[(set (match_dup 0) (match_dup 2))
|
||||
(set (match_dup 0) (plus:HI (match_dup 0) (match_dup 1)))]
|
||||
"")
|
||||
|
||||
;;
|
||||
;; Reorganize address computation based on stack pointer.
|
||||
;;
|
||||
(define_peephole2
|
||||
[(set (match_operand:HI 0 "hard_reg_operand" "")
|
||||
(match_operand:HI 1 "const_int_operand" ""))
|
||||
(set (match_dup 0) (plus:HI (match_dup 0) (reg:HI SP_REGNUM)))]
|
||||
""
|
||||
[(set (match_dup 0) (reg:HI SP_REGNUM))
|
||||
(set (match_dup 0) (plus:HI (match_dup 0) (match_dup 1)))]
|
||||
"")
|
||||
|
||||
;;
|
||||
;; This peephole catches the address computations generated by the reload
|
||||
;; pass.
|
||||
|
|
Loading…
Reference in New Issue