diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2003-03-06 01:34:55 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2003-03-06 01:34:55 +0000 |
commit | 8b41a8dac042759b67563efc87358f014d2f1de4 (patch) | |
tree | 1b1500db78a0b26369d472dd40b6575cf1afccf7 /gcc | |
parent | 39ee7fa95535337ab8e7a0423f3cf00c1bd4ea84 (diff) | |
download | gcc-8b41a8dac042759b67563efc87358f014d2f1de4.zip gcc-8b41a8dac042759b67563efc87358f014d2f1de4.tar.gz gcc-8b41a8dac042759b67563efc87358f014d2f1de4.tar.bz2 |
h8300.md (a peephole2): Generalize to accept a memory operand.
* config/h8300/h8300.md (a peephole2): Generalize to
accept a memory operand.
From-SVN: r63883
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.md | 11 |
2 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d76f71..e5c4f3c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-03-05 Kazu Hirata <kazu@cs.umass.edu> + + * config/h8300/h8300.md (a peephole2): Generalize to + accept a memory operand. + Wed Mar 5 19:34:18 2003 Olivier Hainque <hainque@act-europe.fr> * config/alpha/alpha.h (PRINT_OPERAND_PUNCT_VALID_P): Add '+'. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index cb6bc7a..ed154b7 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -3570,20 +3570,19 @@ (define_peephole2 [(set (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "register_operand" "")) + (match_operand:SI 1 "general_operand" "")) (set (match_dup 0) (and:SI (match_dup 0) (const_int 255)))] "(TARGET_H8300H || TARGET_H8300S) - && REG_P (operands[0]) - && REG_P (operands[1]) - && REGNO (operands[0]) != REGNO (operands[1])" + && !reg_overlap_mentioned_p (operands[0], operands[1]) + && !(GET_CODE (operands[1]) == MEM && MEM_VOLATILE_P (operands[1]))" [(set (match_dup 0) (const_int 0)) (set (strict_low_part (match_dup 2)) (match_dup 3))] - "operands[2] = gen_rtx_REG (QImode, REGNO (operands[0])); - operands[3] = gen_rtx_REG (QImode, REGNO (operands[1]));") + "operands[2] = gen_lowpart (QImode, operands[0]); + operands[3] = gen_lowpart (QImode, operands[1]);") ;; (compare (reg:SI) (const_int)) takes 6 bytes, so we try to achieve ;; the equivalent with shorter sequences. Here is the summary. Cases |