diff options
-rw-r--r-- | lib/Target/ARM/ARMMCInstLower.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMMCInstLower.cpp b/lib/Target/ARM/ARMMCInstLower.cpp index 8774010d89..404a73b95c 100644 --- a/lib/Target/ARM/ARMMCInstLower.cpp +++ b/lib/Target/ARM/ARMMCInstLower.cpp @@ -157,8 +157,10 @@ void ARMMCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const { 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; } |