summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authoraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-12 16:45:34 +0000
committeraesok <aesok@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-12 16:45:34 +0000
commit26b84749b164d326329431d96fcf33e9e8f7d97e (patch)
treec9bc99bac4c8d764ad203d538ae9878e8ae7582c /gcc
parent40b93dba3decd72c7e309030ea72afc3a6510e8b (diff)
downloadgcc-26b84749b164d326329431d96fcf33e9e8f7d97e.tar.gz
PR target/37466
* config/avr/avr.md (movsi_lreg_const peephole2): Add match_dup for scratch register after 'set' pattern. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140321 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/avr/avr.md5
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f499e2fe04a..0528f17e532 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-12 Anatoly Sokolov <aesok@post.ru>
+
+ PR target/37466
+ * config/avr/avr.md (movsi_lreg_const peephole2): Add match_dup for
+ scratch register after 'set' pattern.
+
2008-09-12 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* emit-rtl.c (set_reg_attrs_from_value): Fix invalid alignment
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index 8dad9d8fe80..7a46a3305c4 100644
--- a/gcc/config/avr/avr.md
+++ b/gcc/config/avr/avr.md
@@ -391,10 +391,11 @@
-(define_peephole2
+(define_peephole2 ; movsi_lreg_const
[(match_scratch:QI 2 "d")
(set (match_operand:SI 0 "l_register_operand" "")
- (match_operand:SI 1 "immediate_operand" ""))]
+ (match_operand:SI 1 "immediate_operand" ""))
+ (match_dup 2)]
"(operands[1] != const0_rtx
&& operands[1] != constm1_rtx)"
[(parallel [(set (match_dup 0) (match_dup 1))