[PATCH] D34372: [GISel]: New Opcode G_FMA for fused multiply addition

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 08:54:33 PDT 2017


dsanders accepted this revision.
dsanders added a comment.
This revision is now accepted and ready to land.

LGTM with a nit.



================
Comment at: include/llvm/Target/GenericOpcodes.td:392
+  let OutOperandList = (outs type0:$dst);
+  let InOperandList = (ins type0:$src1, type0:$src2, type0:$src3);
+  let hasSideEffects = 0;
----------------
Is this `$src1 + ($src2 * $src3)` or `($src1 * $src2) + $src3`? Could you add a comment indicating how it should be read?


================
Comment at: include/llvm/Target/GenericOpcodes.td:394
+  let hasSideEffects = 0;
+  let isCommutable = 0;
+}
----------------
This is correct but only because isCommutable also indicates that there are three operands and this has four. Ideally we'd improve on that but I don't think it's a task for this patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D34372





More information about the llvm-commits mailing list