Hi Maxim, On Sat, Jul 22, 2017 at 01:39:53AM +0100, Maxim Blinov wrote: > > (define_insn "pushhi_16" > > [(set (mem:HI (pre_inc:HI (reg:HI SP_REG))) > > (match_operand:HI 0 "general_operand" "rni"))] > > "" > > "push %0" > > ) ("i" matches everything "n" does; did you mean "rmi"? If you did mean "ri", you should use nonmemory_operand). > My question is, why does the compiler match the above RTL code to > my "movhi" template? I have not specified an auto {pre,post} > inc/decremented ("<" or ">") operand constraint anywhere in the > "movhi" template; thus, surely the template match should fail, if the > RTL that is attempted to be matched contains such a *cremented > expression? Because your legitimate_address_p (or similar) is fine with it, I suspect. Segher