[PATCH] D27260: [SelectionDAG] Rename and clarify visitFMULForFMADCombine (NFC)
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 06:14:27 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL288336: [SelectionDAG] Rename and clarify visitFMULForFMADCombine (NFC) (authored by nha).
Changed prior to commit:
https://reviews.llvm.org/D27260?vs=79752&id=79902#toc
Repository:
rL LLVM
https://reviews.llvm.org/D27260
Files:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Index: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -326,7 +326,7 @@
SDValue visitFADDForFMACombine(SDNode *N);
SDValue visitFSUBForFMACombine(SDNode *N);
- SDValue visitFMULForFMACombine(SDNode *N);
+ SDValue visitFMULForFMADistributiveCombine(SDNode *N);
SDValue XformToShuffleWithZero(SDNode *N);
SDValue ReassociateOps(unsigned Opc, const SDLoc &DL, SDValue LHS,
@@ -8380,8 +8380,10 @@
return SDValue();
}
-/// Try to perform FMA combining on a given FMUL node.
-SDValue DAGCombiner::visitFMULForFMACombine(SDNode *N) {
+/// Try to perform FMA combining on a given FMUL node based on the distributive
+/// law x * (y + 1) = x * y + x and variants thereof (commuted versions,
+/// subtraction instead of addition).
+SDValue DAGCombiner::visitFMULForFMADistributiveCombine(SDNode *N) {
SDValue N0 = N->getOperand(0);
SDValue N1 = N->getOperand(1);
EVT VT = N->getValueType(0);
@@ -8776,7 +8778,7 @@
}
// FMUL -> FMA combines:
- if (SDValue Fused = visitFMULForFMACombine(N)) {
+ if (SDValue Fused = visitFMULForFMADistributiveCombine(N)) {
AddToWorklist(Fused.getNode());
return Fused;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27260.79902.patch
Type: text/x-patch
Size: 1348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161201/51ffbb47/attachment.bin>
More information about the llvm-commits
mailing list