[llvm-commits] [llvm] r55425 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Dan Gohman
gohman at apple.com
Wed Aug 27 11:01:42 PDT 2008
Author: djg
Date: Wed Aug 27 13:01:42 2008
New Revision: 55425
URL: http://llvm.org/viewvc/llvm-project?rev=55425&view=rev
Log:
Add a comment about the current floating-point constant code in FastISel.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=55425&r1=55424&r2=55425&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Wed Aug 27 13:01:42 2008
@@ -525,6 +525,12 @@
// 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();
More information about the llvm-commits
mailing list