1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Add a comment about the current floating-point constant code in FastISel.

llvm-svn: 55425
This commit is contained in:
Dan Gohman 2008-08-27 18:01:42 +00:00
parent 23569e6a1f
commit 6174651396

View File

@ -525,6 +525,12 @@ unsigned FastISel::FastEmit_rf_(MVT::SimpleValueType VT, ISD::NodeType Opcode,
// Materialize the constant in a register. // Materialize the constant in a register.
unsigned MaterialReg = FastEmit_f(ImmType, ImmType, ISD::ConstantFP, FPImm); unsigned MaterialReg = FastEmit_f(ImmType, ImmType, ISD::ConstantFP, FPImm);
if (MaterialReg == 0) { 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(); const APFloat &Flt = FPImm->getValueAPF();
MVT IntVT = TLI.getPointerTy(); MVT IntVT = TLI.getPointerTy();