projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59afba0
)
avoid an APFloat copy.
author
Chris Lattner
<sabre@nondot.org>
Mon, 15 Oct 2007 05:34:10 +0000
(
05:34
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 15 Oct 2007 05:34:10 +0000
(
05:34
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42979
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/ConstantFold.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/ConstantFold.cpp
b/lib/VMCore/ConstantFold.cpp
index 485b42863b2a346fda530e416b5513c8d588469c..da7e768d72087ca340fbb7b089e8ed6ba0c3cd59 100644
(file)
--- a/
lib/VMCore/ConstantFold.cpp
+++ b/
lib/VMCore/ConstantFold.cpp
@@
-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,