diff options
author | Dale Johannesen <dalej@apple.com> | 2010-05-07 21:35:53 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-05-07 21:35:53 +0000 |
commit | 0a406ae0d940d92c51ee145b48ff7a483a366849 (patch) | |
tree | a2f28e5284f7cd9295f83072a364ee68a798b185 /include/llvm/CodeGen/SelectionDAG.h | |
parent | e9f8f5e6004fd49f2aff4dd23db8e9b0e4454fc6 (diff) | |
download | external_llvm-0a406ae0d940d92c51ee145b48ff7a483a366849.tar.gz external_llvm-0a406ae0d940d92c51ee145b48ff7a483a366849.tar.bz2 external_llvm-0a406ae0d940d92c51ee145b48ff7a483a366849.zip |
Fix PR 7087, and probably other things, by extending
getConstantFP to accept the two supported long double
target types. This was not the original intent, but
there are other places that assume this works and it's
easy enough to do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAG.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index ae15230c96..b1af0abbad 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -334,6 +334,8 @@ public: SDValue getTargetConstant(const ConstantInt &Val, EVT VT) { return getConstant(Val, VT, true); } + // The forms below that take a double should only be used for simple + // constants that can be exactly represented in VT. No checks are made. SDValue getConstantFP(double Val, EVT VT, bool isTarget = false); SDValue getConstantFP(const APFloat& Val, EVT VT, bool isTarget = false); SDValue getConstantFP(const ConstantFP &CF, EVT VT, bool isTarget = false); |