diff options
| author | ciceron <ciceron@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-25 16:45:22 +0000 |
|---|---|---|
| committer | ciceron <ciceron@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-25 16:45:22 +0000 |
| commit | d929cf6d90e6fe1d12ea840bc2afd7d6f26e5ab2 (patch) | |
| tree | 95c913ce93135e0e58a8f9b14c3fc3d92b02cdea | |
| parent | 72e967d481bec10b7c377776b93f47fd382d61c3 (diff) | |
| download | ppe42-gcc-d929cf6d90e6fe1d12ea840bc2afd7d6f26e5ab2.tar.gz ppe42-gcc-d929cf6d90e6fe1d12ea840bc2afd7d6f26e5ab2.zip | |
* config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize
address computations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47323 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/config/m68hc11/m68hc11.md | 26 |
2 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b320b21131..e6ec65b9b4e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 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 register b (low part of d). diff --git a/gcc/config/m68hc11/m68hc11.md b/gcc/config/m68hc11/m68hc11.md index 10886d28997..f201e740895 100644 --- a/gcc/config/m68hc11/m68hc11.md +++ b/gcc/config/m68hc11/m68hc11.md @@ -6103,6 +6103,32 @@ ;;-------------------------------------------------------------------- ;; +;; 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. (define_peephole |

