Hi, I have a question about having multiple insns for one operation. Take m68k port for example. It has many SImode move insns like so:
(define_insn "pushexthisi_const" [(set (match_operand:SI 0 "push_operand" "=m") (match_operand:SI 1 "const_int_operand" "J"))] (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=a") (match_operand:QI 1 "address_operand" "p"))] (define_insn "movsi_const0" [(set (match_operand:SI 0 "nonimmediate_operand" "=g") (const_int 0))] (define_insn "" ;; Notes: make sure no alternative allows g vs g. ;; We don't allow f-regs since fixed point cannot go in them. [(set (match_operand:SI 0 "nonimmediate_operand" "=g,d,a<") (match_operand:SI 1 "general_src_operand" "daymSKT,n,i"))] "!TARGET_COLDFIRE" Now, is it OK to have this many? IIRC, reload makes certain changes to insns without re-recognizing modified ones. (Well, it used to at least.) A few years ago, I ran into this kind of trouble in H8 port having multiple add insns, which were cleaned up soon afterwards. Aside from reload issues, are there other potential problems with having multiple insns for one operation? Maybe maintainance reasons? Having multiple move insns may make it difficult for people to figure out which pattern a given insn matches because we would have to go through a machine description to find the first matching insn. (By the way, I do understand that it's OK to have multiple patterns for different targets because values of TARGET_xxx don't change within one run of cc1.) FWIW, the second define_insn above could have "plus" in operands[1], in which case it overlaps with other insns with plus. Thanks in advance, Kazu Hirata