On Fri, Oct 23, 2020 at 09:35:20AM +0200, Stefan Franke wrote: > it seems your define_expand for movsi is too narrow. It should accept all mandatory forms. The distinction - to register/memory - should be done in movsi itself. There is also no need for a database to distinguish. The requirement is that reload (which should be LRA on all newer ports, and is recommended for all ports) always has a path to reload whatever is thrown at it. This does mean you need both r->m and m->r in one pattern normally, yes (all r's can be spilled to stack, and there is no m->m instruction). Of course you get by far the best code if you do have all normal moves in one pattern (one per mode), as you say. You disallow m->m in the insn condition, like "gpc_reg_operand (operands[0], SImode) || gpc_reg_operand (operands[1], SImode)" Segher