diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-27 20:59:43 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-27 20:59:43 +0000 |
commit | 69c464dec4795af43b4a432bae2b329ee5f1bef5 (patch) | |
tree | 3e3a64f042f90003a35e4cc3a91386fe47c1d11c /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | 7b2b1ec6b1a573c7b5909bb082ff27766774db80 (diff) | |
download | bcm5719-llvm-69c464dec4795af43b4a432bae2b329ee5f1bef5.tar.gz bcm5719-llvm-69c464dec4795af43b4a432bae2b329ee5f1bef5.zip |
Move ConstantFP construction back to the 2.5-ish API.
llvm-svn: 77247
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 15daf3efb4a..a6538dcaa23 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -2354,7 +2354,7 @@ Instruction *InstCombiner::visitFAdd(BinaryOperator &I) { if (Constant *RHSC = dyn_cast<Constant>(RHS)) { // X + 0 --> X if (ConstantFP *CFP = dyn_cast<ConstantFP>(RHSC)) { - if (CFP->isExactlyValue(Context->getConstantFPNegativeZero + if (CFP->isExactlyValue(ConstantFP::getNegativeZero (I.getType())->getValueAPF())) return ReplaceInstUsesWith(I, LHS); } @@ -8779,7 +8779,7 @@ static Constant *FitsInFPType(ConstantFP *CFP, const fltSemantics &Sem, APFloat F = CFP->getValueAPF(); (void)F.convert(Sem, APFloat::rmNearestTiesToEven, &losesInfo); if (!losesInfo) - return Context->getConstantFP(F); + return ConstantFP::get(*Context, F); return 0; } |