mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-28 00:50:37 +00:00
avoid an APFloat copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42979 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
59afba0fe9
commit
3cab1c72b5
@ -194,7 +194,7 @@ Constant *llvm::ConstantFoldCastInstruction(unsigned opc, const Constant *V,
|
||||
case Instruction::FPToUI:
|
||||
case Instruction::FPToSI:
|
||||
if (const ConstantFP *FPC = dyn_cast<ConstantFP>(V)) {
|
||||
APFloat V = FPC->getValueAPF();
|
||||
const APFloat &V = FPC->getValueAPF();
|
||||
uint64_t x[2];
|
||||
uint32_t DestBitWidth = cast<IntegerType>(DestTy)->getBitWidth();
|
||||
(void) V.convertToInteger(x, DestBitWidth, opc==Instruction::FPToSI,
|
||||
|
Loading…
x
Reference in New Issue
Block a user