summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-27 20:59:43 +0000
committerOwen Anderson <resistor@mac.com>2009-07-27 20:59:43 +0000
commit69c464dec4795af43b4a432bae2b329ee5f1bef5 (patch)
tree3e3a64f042f90003a35e4cc3a91386fe47c1d11c /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
parent7b2b1ec6b1a573c7b5909bb082ff27766774db80 (diff)
downloadbcm5719-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/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index 8685c85b586..3a8b782564c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
@@ -2148,8 +2148,7 @@ void SelectionDAGLowering::visitFSub(User &I) {
const VectorType *DestTy = cast<VectorType>(I.getType());
const Type *ElTy = DestTy->getElementType();
unsigned VL = DestTy->getNumElements();
- std::vector<Constant*> NZ(VL,
- DAG.getContext()->getConstantFPNegativeZero(ElTy));
+ std::vector<Constant*> NZ(VL, ConstantFP::getNegativeZero(ElTy));
Constant *CNZ = DAG.getContext()->getConstantVector(&NZ[0], NZ.size());
if (CV == CNZ) {
SDValue Op2 = getValue(I.getOperand(1));
@@ -2160,8 +2159,7 @@ void SelectionDAGLowering::visitFSub(User &I) {
}
}
if (ConstantFP *CFP = dyn_cast<ConstantFP>(I.getOperand(0)))
- if (CFP->isExactlyValue(
- DAG.getContext()->getConstantFPNegativeZero(Ty)->getValueAPF())) {
+ if (CFP->isExactlyValue(ConstantFP::getNegativeZero(Ty)->getValueAPF())) {
SDValue Op2 = getValue(I.getOperand(1));
setValue(&I, DAG.getNode(ISD::FNEG, getCurDebugLoc(),
Op2.getValueType(), Op2));
OpenPOWER on IntegriCloud