Switch the canonical FMA term operand order to match both the comment I wrote and the usual LLVM convention.
llvm-svn: 157708
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 647ff6b..3b8489f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -5771,7 +5771,7 @@
return DAG.getNode(ISD::FADD, N->getDebugLoc(), VT, N0, N2);
// Canonicalize (fma c, x, y) -> (fma x, c, y)
- if (!N0CFP && N1CFP)
+ if (N0CFP && !N1CFP)
return DAG.getNode(ISD::FMA, N->getDebugLoc(), VT, N1, N0, N2);
return SDValue();