AArch64ISD::FMA_PRED nodes with negated operands are matching to suboptimal hardware instructions. We can commute the multiplication operands to generate better instruction sequences. This patch adds a pattern to commute operands for an unmasked FMSB instruction.
I'll try to send matching patches for predicated FMLS and FNMLA patterns soon, assuming this is accepted. Although, if someone is motivated to rework this multiclass in a cohesive way, please feel free.
When creating the PatFrags you want the ops operands to be treated consistently. In this instance you always want $op1 to be the negated operand because that is the operand that will be negated by the instruction you'll eventually match it to. So the first pattern is fine but the second should switch the usage of $op1 and $op2.