[llvm-commits] [llvm] r114096 - /llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp
Jim Grosbach
grosbach at apple.com
Thu Sep 16 10:37:30 PDT 2010
Author: grosbach
Date: Thu Sep 16 12:37:30 2010
New Revision: 114096
URL: http://llvm.org/viewvc/llvm-project?rev=114096&view=rev
Log:
Make sure to promote single precision floats to double before extracting them
from the APFloat.
Modified:
llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp?rev=114096&r1=114095&r2=114096&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp Thu Sep 16 12:37:30 2010
@@ -157,8 +157,10 @@
MO.getBlockAddress()));
break;
case MachineOperand::MO_FPImmediate:
- MCOp =
- MCOperand::CreateFPImm(MO.getFPImm()->getValueAPF().convertToDouble());
+ APFloat Val = MO.getFPImm()->getValueAPF();
+ bool ignored;
+ Val.convert(APFloat::IEEEdouble, APFloat::rmTowardZero, &ignored);
+ MCOp = MCOperand::CreateFPImm(Val.convertToDouble());
break;
}
More information about the llvm-commits
mailing list