summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-04-10 20:35:27 +0000
committerDuncan Sands <baldrick@free.fr>2012-04-10 20:35:27 +0000
commit4f53074cca08419abb550df2cfce0eaf33003c11 (patch)
treed1a974be90dd5d9387df36b0d505a0e673427e84 /llvm/lib/CodeGen
parent11a434ab2eedce89acaa6efb965b41bfb2191eb5 (diff)
downloadbcm5719-llvm-4f53074cca08419abb550df2cfce0eaf33003c11.tar.gz
bcm5719-llvm-4f53074cca08419abb550df2cfce0eaf33003c11.zip
Add a comment noting that the fdiv -> fmul conversion won't generate
multiplication by a denormal, and some tests checking that. llvm-svn: 154431
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index b5b20284c1d..ae7c941b134 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -5769,9 +5769,9 @@ SDValue DAGCombiner::visitFDIV(SDNode *N) {
APFloat N1APF = N1CFP->getValueAPF();
APFloat Recip(N1APF.getSemantics(), 1); // 1.0
APFloat::opStatus st = Recip.divide(N1APF, APFloat::rmNearestTiesToEven);
- // Only do the transform if the reciprocal is not too horrible (eg not NaN)
- // and the reciprocal is a legal fp imm.
- if ((st == APFloat::opOK || st == APFloat::opInexact) &&
+ // Only do the transform if the reciprocal is a legal fp immediate that
+ // isn't too nasty (eg NaN, denormal, ...).
+ if ((st == APFloat::opOK || st == APFloat::opInexact) && // Not too nasty
(!LegalOperations ||
// FIXME: custom lowering of ConstantFP might fail (see e.g. ARM
// backend)... we should handle this gracefully after Legalize.
OpenPOWER on IntegriCloud