diff options
| author | Duncan Sands <baldrick@free.fr> | 2008-10-20 16:14:43 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2008-10-20 16:14:43 +0000 |
| commit | 840143fc6f74764c0278e7a348902a317e097ad4 (patch) | |
| tree | 58fe84a6ea7957aefc75a23bd6a55d5a3fff9877 /llvm | |
| parent | 5805334d5b1d8c4bf9571d31071ff9ad664d5d6e (diff) | |
| download | bcm5719-llvm-840143fc6f74764c0278e7a348902a317e097ad4.tar.gz bcm5719-llvm-840143fc6f74764c0278e7a348902a317e097ad4.zip | |
Use DAG.getIntPtrConstant rather than DAG.getConstant
with TLI.getPointerTy for a small simplification.
llvm-svn: 57837
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp index 466eedb0db6..b0583cfa75e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp @@ -767,10 +767,8 @@ void DAGTypeLegalizer::ExpandFloatRes_XINT_TO_FP(SDNode *N, SDValue &Lo, MVT::ppcf128)); Lo = DAG.getNode(ISD::SELECT_CC, VT, Src, DAG.getConstant(0, SrcVT), Lo, Hi, DAG.getCondCode(ISD::SETLT)); - Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, NVT, Lo, - DAG.getConstant(1, TLI.getPointerTy())); - Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, NVT, Lo, - DAG.getConstant(0, TLI.getPointerTy())); + Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, NVT, Lo, DAG.getIntPtrConstant(1)); + Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, NVT, Lo, DAG.getIntPtrConstant(0)); } diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp index 30e4ceaf53a..32171a591a2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp @@ -469,7 +469,7 @@ SDValue DAGTypeLegalizer::PromoteIntRes_VAARG(SDNode *N) { // of zero here!). unsigned Increment = VT.getSizeInBits() / 8; SDValue Tmp = DAG.getNode(ISD::ADD, TLI.getPointerTy(), VAList, - DAG.getConstant(Increment, TLI.getPointerTy())); + DAG.getIntPtrConstant(Increment)); // Store the incremented VAList to the pointer. Tmp = DAG.getStore(VAList.getValue(1), Tmp, Ptr, V, 0); @@ -2073,7 +2073,7 @@ SDValue DAGTypeLegalizer::ExpandIntOp_UINT_TO_FP(SDNode *N) { // Build a 64 bit pair (0, FF) in the constant pool, with FF in the lo bits. SDValue FudgePtr = DAG.getConstantPool(ConstantInt::get(FF.zext(64)), - TLI.getPointerTy()); + TLI.getPointerTy()); // Get a pointer to FF if the sign bit was set, or to 0 otherwise. SDValue Zero = DAG.getIntPtrConstant(0); |

