[PATCH] D33848: Do not recombine FMA when that is not needed.
Amaury SECHET via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 2 12:44:41 PDT 2017
deadalnix created this revision.
As per title. This creates useless recombines.
https://reviews.llvm.org/D33848
Files:
lib/Target/X86/X86ISelLowering.cpp
Index: lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- lib/Target/X86/X86ISelLowering.cpp
+++ lib/Target/X86/X86ISelLowering.cpp
@@ -34179,7 +34179,9 @@
} else {
assert((N->getOpcode() == X86ISD::FMADD || N->getOpcode() == ISD::FMA) &&
"Unexpected opcode!");
- return DAG.getNode(NewOpcode, dl, VT, A, B, C);
+ if (NewOpcode != N->getOpcode())
+ return DAG.getNode(NewOpcode, dl, VT, A, B, C);
+ return SDValue();
}
return DAG.getNode(NewOpcode, dl, VT, A, B, C, N->getOperand(3));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33848.101264.patch
Type: text/x-patch
Size: 583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170602/cfcccbf5/attachment.bin>
More information about the llvm-commits
mailing list