From 1e58aefec437e9d9da7a757a3c43aa5fba9ca8dc Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Mon, 6 Feb 2017 11:38:52 +0000 Subject: [PATCH] avr.md (*addhi3_zero_extend): Add alternative where REGNO($0) == REGNO($1). * config/avr/avr.md (*addhi3_zero_extend): Add alternative where REGNO($0) == REGNO($1). From-SVN: r245206 --- gcc/ChangeLog | 5 +++++ gcc/config/avr/avr.md | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0a6414fb962..9b9657df517 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-02-06 Georg-Johann Lay + + * config/avr/avr.md (*addhi3_zero_extend): Add alternative where + REGNO($0) == REGNO($1). + 2017-02-06 Andreas Krebbel * config/s390/linux.h(SIZE_TYPE): Add comment. diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 256b2b66b71..c246e676698 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -1200,12 +1200,14 @@ (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" -- 2.30.2