Hi Juzhe, >>> Can you explain these two points (3 and 4, maybe 2) a bit in the comments? >>> I.e. what makes fma different from a normal insn? > You can take a lookt at vector.md. The ternary instruction pattern has > operands[0] operands[1] operands[2] operands[3] operands[4] operands[5] : > > operands[0] = operands[1] ? operands[2] * operands[3] + operands[4] : > operands[5] > These operands are not necessary the same RTX but we should make them overlap. > Why have operands[5] ? Since we will have len_cond_fma. > So I want to lower simple fma pattern into patterns I define in vector.md. > operands[5] should be operands[1] if operands[1] overlap operand[0] --->vmacc > or operands[3] if operands[3] overlap operand[0] -->vmadd
yes, the general principle is clear (it's same for other insns as well). My point was to make sure we document that a bit more verbosely in the comments so future readers will immediately know what they are dealing with. Thanks Robin