[llvm] r235508 - Fixed logic to enable complex FMA formation.
Olivier Sallenave
ohsallen at us.ibm.com
Wed Apr 22 07:07:26 PDT 2015
Author: ohsallen
Date: Wed Apr 22 09:07:26 2015
New Revision: 235508
URL: http://llvm.org/viewvc/llvm-project?rev=235508&view=rev
Log:
Fixed logic to enable complex FMA formation.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=235508&r1=235507&r2=235508&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Apr 22 09:07:26 2015
@@ -7164,7 +7164,7 @@ SDValue DAGCombiner::visitFADDForFMAComb
N0));
}
- if (LookThroughFPExt) {
+ if (UnsafeFPMath && LookThroughFPExt) {
// fold (fadd (fma x, y, (fpext (fmul u, v))), z)
// -> (fma x, y, (fma (fpext u), (fpext v), z))
auto FoldFAddFMAFPExtFMul = [&] (
@@ -7415,7 +7415,7 @@ SDValue DAGCombiner::visitFSUBForFMAComb
N21, N0));
}
- if (LookThroughFPExt) {
+ if (UnsafeFPMath && LookThroughFPExt) {
// fold (fsub (fma x, y, (fpext (fmul u, v))), z)
// -> (fma x, y (fma (fpext u), (fpext v), (fneg z)))
if (N0.getOpcode() == PreferredFusedOpcode) {
More information about the llvm-commits
mailing list