re PR target/37466 ([AVR] avr-gcc generating incorrect assembly for expression with...
authorAnatoly Sokolov <aesok@post.ru>
Fri, 12 Sep 2008 16:45:34 +0000 (20:45 +0400)
committerAnatoly Sokolov <aesok@gcc.gnu.org>
Fri, 12 Sep 2008 16:45:34 +0000 (20:45 +0400)
PR target/37466
* config/avr/avr.md (movsi_lreg_const peephole2): Add match_dup for
scratch register after 'set' pattern.

From-SVN: r140321

gcc/ChangeLog
gcc/config/avr/avr.md

index f499e2fe04ab62c77fb0672bb3c05c5d0457da91..0528f17e532326e2fa710495f23d92ddc57e257f 100644 (file)
@@ -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
index 8dad9d8fe80710f0b7142e2757ccd73fbfab98e5..7a46a3305c4d220bbdc812b5abb32f4ffbe316b7 100644 (file)
 
 
 
-(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))