diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-27 06:19:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-27 06:19:08 +0000 |
commit | bf9f208f1f87270c504db7d2600b4c978f43e9ab (patch) | |
tree | 394afd5ccfb9b9f8e31eab660e305156d56c4360 /include/llvm/CodeGen/SelectionDAGNodes.h | |
parent | 49ad98b50d3918b04971204febf7ee32460d9faa (diff) | |
download | external_llvm-bf9f208f1f87270c504db7d2600b4c978f43e9ab.zip external_llvm-bf9f208f1f87270c504db7d2600b4c978f43e9ab.tar.gz external_llvm-bf9f208f1f87270c504db7d2600b4c978f43e9ab.tar.bz2 |
make isExactlyValue work for long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46410 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 395f1bf..ecbb0bf 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -1208,10 +1208,9 @@ public: /// 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; |