summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-27 18:01:42 +0000
committerDan Gohman <gohman@apple.com>2008-08-27 18:01:42 +0000
commitf2a6c1579f93b376eec1c78e97e952b1c71e7c9d (patch)
tree0660a4c7d2c0c77a7754e1494a72839c62040082 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
parentcf7ca5d0ba185eca8df642cbc911becb4ae1cb50 (diff)
downloadbcm5719-llvm-f2a6c1579f93b376eec1c78e97e952b1c71e7c9d.tar.gz
bcm5719-llvm-f2a6c1579f93b376eec1c78e97e952b1c71e7c9d.zip
Add a comment about the current floating-point constant code in FastISel.
llvm-svn: 55425
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index ac35c43e787..ff07d9a46d9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud