From 6174651396d27a9503cfed7b8c7acbcbcdff9ab0 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 27 Aug 2008 18:01:42 +0000 Subject: [PATCH] Add a comment about the current floating-point constant code in FastISel. llvm-svn: 55425 --- lib/CodeGen/SelectionDAG/FastISel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index ac35c43e787..ff07d9a46d9 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();