[PATCH] DAGCombine: always constant fold FMA when target disable FP exceptions
Mehdi AMINI
mehdi.amini at apple.com
Thu Jan 15 22:23:48 PST 2015
New approach using !TLI->hasFloatingPointExceptions() ; this seems coherent with what is done in getNode() for binary floating point operations.
http://reviews.llvm.org/D6912
Files:
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Index: lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -3591,7 +3591,7 @@
const APFloat &V3 = N3CFP->getValueAPF();
APFloat::opStatus s =
V1.fusedMultiplyAdd(V2, V3, APFloat::rmNearestTiesToEven);
- if (s != APFloat::opInvalidOp)
+ if (!TLI->hasFloatingPointExceptions() || s != APFloat::opInvalidOp)
return getConstantFP(V1, VT);
}
break;
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6912.18292.patch
Type: text/x-patch
Size: 549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150116/27668953/attachment.bin>
More information about the llvm-commits
mailing list