diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-16 19:05:41 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-16 19:05:41 +0000 |
commit | c277dc408bea3697fbaa3429658c4d8deff3f066 (patch) | |
tree | f65e750a09ae0ea781e0dc379886adaf7be21a77 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | bf61e3b4d3fd81eb65c44bd71b6e001127906b98 (diff) | |
download | bcm5719-llvm-c277dc408bea3697fbaa3429658c4d8deff3f066.tar.gz bcm5719-llvm-c277dc408bea3697fbaa3429658c4d8deff3f066.zip |
Privatize the ConstantFP table. I'm on a roll!
llvm-svn: 76097
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 4f90bb31fcf..3c85118cada 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -2146,7 +2146,8 @@ 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, Context->getConstantFPNegativeZero(ElTy)); + std::vector<Constant*> NZ(VL, + DAG.getContext()->getConstantFPNegativeZero(ElTy)); Constant *CNZ = DAG.getContext()->getConstantVector(&NZ[0], NZ.size()); if (CV == CNZ) { SDValue Op2 = getValue(I.getOperand(1)); @@ -2158,7 +2159,7 @@ void SelectionDAGLowering::visitFSub(User &I) { } if (ConstantFP *CFP = dyn_cast<ConstantFP>(I.getOperand(0))) if (CFP->isExactlyValue( - Context->getConstantFPNegativeZero(Ty)->getValueAPF())) { + DAG.getContext()->getConstantFPNegativeZero(Ty)->getValueAPF())) { SDValue Op2 = getValue(I.getOperand(1)); setValue(&I, DAG.getNode(ISD::FNEG, getCurDebugLoc(), Op2.getValueType(), Op2)); |