[PATCH] D33848: Do not recombine FMA when that is not needed.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 05:42:42 PDT 2017


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

LGTM - add comments if you can.



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:34532
 
+  if (N->getOpcode() == X86ISD::FMADD || N->getOpcode() == ISD::FMA) {
+    if (HasNeg || NewOpcode != N->getOpcode())
----------------
comment


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:34563
 
-  return DAG.getNode(NewOpcode, dl, VT, A, B, C, N->getOperand(3));
+  if (HasNeg || NewOpcode != N->getOpcode())
+    return DAG.getNode(NewOpcode, dl, VT, A, B, C, N->getOperand(3));
----------------
comment


https://reviews.llvm.org/D33848





More information about the llvm-commits mailing list