Author: lattner
Date: Sun Jan 27 00:19:08 2008
New Revision: 46410

URL: http://llvm.org/viewvc/llvm-project?rev=46410&view=rev
Log:
make isExactlyValue work for long double.

Modified:
    llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h

Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=46410&r1=46409&r2=46410&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Sun Jan 27 00:19:08 2008
@@ -1208,10 +1208,9 @@
   /// convenient to write "2.0" and the like.  Without this function we'd 
   /// have to duplicate its logic everywhere it's called.
   bool isExactlyValue(double V) const { 
-    if (getValueType(0)==MVT::f64)
-      return isExactlyValue(APFloat(V));
-    else
-      return isExactlyValue(APFloat((float)V));
+    APFloat Tmp(V);
+    Tmp.convert(Value.getSemantics(), APFloat::rmNearestTiesToEven);
+    return isExactlyValue(Tmp);
   }
   bool isExactlyValue(const APFloat& V) const;
 


_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to