diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-30 13:00:32 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-30 13:00:32 +0000 |
commit | 909d2cfeda0524661b48c364ca5836938275cc7b (patch) | |
tree | 239afe8ee9628ed751c4fb9a0c9b10cbaf6b8406 /gcc | |
parent | 1889e8ff3e74ded29852af0155d64e2d0991ab77 (diff) | |
download | gcc-909d2cfeda0524661b48c364ca5836938275cc7b.tar.gz |
* config/h8300/h8300.md (a peephole2): Remove useless code.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65039 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.md | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be4f3dd3ace..871f97269f4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-03-30 Kazu Hirata <kazu@cs.umass.edu> + + * config/h8300/h8300.md (a peephole2): Remove useless code. + 2003-03-29 Kazu Hirata <kazu@cs.umass.edu> * config/h8300/h8300.md (*iorsi3_and_ashift): New. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 8c8ed6d306d..b63ed49decc 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -3934,6 +3934,9 @@ (const_int 8)))] "") +;; If a load of mem:SI is followed by an AND that turns off the upper +;; half, then we can load mem:HI instead. + (define_peephole2 [(set (match_operand:SI 0 "register_operand" "") (match_operand:SI 1 "memory_operand" "")) @@ -3941,7 +3944,7 @@ (and:SI (match_dup 0) (match_operand:SI 2 "const_int_operand" "")))] "(TARGET_H8300H || TARGET_H8300S) - && !(GET_CODE (operands[1]) == MEM && MEM_VOLATILE_P (operands[1])) + && !MEM_VOLATILE_P (operands[1]) && (INTVAL (operands[2]) & ~0xffff) == 0 && INTVAL (operands[2]) != 255" [(set (match_dup 3) |