avr.md (*addhi3_zero_extend): Add alternative where REGNO($0) == REGNO($1).
authorGeorg-Johann Lay <avr@gjlay.de>
Mon, 6 Feb 2017 11:38:52 +0000 (11:38 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Mon, 6 Feb 2017 11:38:52 +0000 (11:38 +0000)
* config/avr/avr.md (*addhi3_zero_extend): Add alternative where
REGNO($0) == REGNO($1).

From-SVN: r245206

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

index 0a6414fb962839ed88d7a6695873d1302010d6ef..9b9657df5175a955703310975b18a0f19d607402 100644 (file)
@@ -1,3 +1,8 @@
+2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
+
+       * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
+       REGNO($0) == REGNO($1).
+
 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
 
        * config/s390/linux.h(SIZE_TYPE): Add comment.
index 256b2b66b71b27b88a25bd7a5b234acad8410618..c246e676698ec09b10e4b6dd569cf53043d913a7 100644 (file)
 
 
 (define_insn "*addhi3_zero_extend"
-  [(set (match_operand:HI 0 "register_operand"                         "=r")
-        (plus:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r"))
-                 (match_operand:HI 2 "register_operand"                 "0")))]
+  [(set (match_operand:HI 0 "register_operand"                         "=r,*?r")
+        (plus:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r  ,0"))
+                 (match_operand:HI 2 "register_operand"                 "0  ,r")))]
   ""
-  "add %A0,%1\;adc %B0,__zero_reg__"
-  [(set_attr "length" "2")
+  "@
+       add %A0,%1\;adc %B0,__zero_reg__
+       add %A0,%A2\;mov %B0,%B2\;adc %B0,__zero_reg__"
+  [(set_attr "length" "2,3")
    (set_attr "cc" "set_n")])
 
 (define_insn "*addhi3_zero_extend1"