diff options
author | Dan Gohman <gohman@apple.com> | 2008-08-27 18:01:42 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-08-27 18:01:42 +0000 |
commit | 96a9999d79345fa7bc7e2f2a3f28edef4c69e6b5 (patch) | |
tree | dcddd595e123d04c0e0241d114f6589def5d30ee | |
parent | 541532724e29203e28c2fe0136cf6eabd49d4532 (diff) | |
download | external_llvm-96a9999d79345fa7bc7e2f2a3f28edef4c69e6b5.zip external_llvm-96a9999d79345fa7bc7e2f2a3f28edef4c69e6b5.tar.gz external_llvm-96a9999d79345fa7bc7e2f2a3f28edef4c69e6b5.tar.bz2 |
Add a comment about the current floating-point constant code in FastISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55425 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index ac35c43..ff07d9a 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -525,6 +525,12 @@ unsigned FastISel::FastEmit_rf_(MVT::SimpleValueType VT, ISD::NodeType Opcode, // Materialize the constant in a register. unsigned MaterialReg = FastEmit_f(ImmType, ImmType, ISD::ConstantFP, FPImm); if (MaterialReg == 0) { + // If the target doesn't have a way to directly enter a floating-point + // value into a register, use an alternate approach. + // TODO: The current approach only supports floating-point constants + // that can be constructed by conversion from integer values. This should + // be replaced by code that creates a load from a constant-pool entry, + // which will require some target-specific work. const APFloat &Flt = FPImm->getValueAPF(); MVT IntVT = TLI.getPointerTy(); |