diff options
| author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-06 15:14:37 +0000 |
|---|---|---|
| committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-06 15:14:37 +0000 |
| commit | 40d58d2016e2b6422f8a6f4a255dbef09b086ec9 (patch) | |
| tree | d89d9f28270a2d763ca393487a6cc3bed2246514 | |
| parent | cb1e7b2b662c8fee423f41616bd6198204af0e8e (diff) | |
| download | ppe42-gcc-40d58d2016e2b6422f8a6f4a255dbef09b086ec9.tar.gz ppe42-gcc-40d58d2016e2b6422f8a6f4a255dbef09b086ec9.zip | |
* config/h8300/h8300.md (a new peephole2): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63892 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 4 | ||||
| -rw-r--r-- | gcc/config/h8300/h8300.md | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a565690cd6..d6264c19504 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-03-06 Kazu Hirata <kazu@cs.umass.edu> + + * config/h8300/h8300.md (a new peephole2): New. + Thu Mar 6 14:20:15 CET 2003 Jan Hubicka <jh@suse.cz> * cgraph.c (cgraph_node): Do not confuse nested functions and methods. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index ed154b7d79a..518c98c02f6 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -3584,6 +3584,25 @@ "operands[2] = gen_lowpart (QImode, operands[0]); operands[3] = gen_lowpart (QImode, operands[1]);") +(define_peephole2 + [(set (match_operand:SI 0 "register_operand" "") + (match_operand:SI 1 "memory_operand" "")) + (set (match_dup 0) + (and:SI (match_dup 0) + (match_operand:SI 2 "const_int_operand" "")))] + "(TARGET_H8300H || TARGET_H8300S) + && !reg_overlap_mentioned_p (operands[0], operands[1]) + && !(GET_CODE (operands[1]) == MEM && MEM_VOLATILE_P (operands[1])) + && (INTVAL (operands[2]) & ~0xffff) == 0 + && INTVAL (operands[2]) != 255" + [(set (match_dup 3) + (match_dup 4)) + (set (match_dup 0) + (and:SI (match_dup 0) + (match_dup 2)))] + "operands[3] = gen_lowpart (HImode, operands[0]); + operands[4] = gen_lowpart (HImode, 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 ;; are grouped for each define_peephole2. |

