On Dez 13 2015, Jeff Law <l...@redhat.com> wrote: > diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md > index 1eaf58f..444515a 100644 > --- a/gcc/config/m68k/m68k.md > +++ b/gcc/config/m68k/m68k.md > @@ -7601,3 +7601,36 @@ > > (include "cf.md") > (include "sync.md") > + > +;; Convert > +;; > +;; move.l 4(%a0),%a0 > +;; clr.b (%a0,%a1.l) > +;; > +;; into > +;; > +;; add.l 4(%a0),%a1 > +;; clr.b (%a1) > +;; > +;; The latter is smaller. It is faster on all models except m68060. > + > +(define_peephole2 > + [(set (match_operand:SI 0 "register_operand" "") > + (mem:SI (plus:SI (match_operand:SI 1 "register_operand" "") > + (match_operand:SI 2 "const_int_operand" "")))) > + (set (mem:QI (plus:SI (match_operand:SI 3 "register_operand" "") > + (match_operand:SI 4 "register_operand" ""))) > + (const_int 0))] > + "(optimize_size || !TUNE_68060) > + && (operands[0] == operands[3] || operands[0] == operands[4]) > + && ADDRESS_REG_P (operands[1]) > + && ADDRESS_REG_P ((operands[0] == operands[3]) ? operands[4] : > operands[3])
Shouldn't that use rtx_equal_p? Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."