From: Chris Lattner Date: Thu, 23 Mar 2006 05:29:04 +0000 (+0000) Subject: simplify some code X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=408c428096df3a3970a8387f9dd258ae948663a6;p=oota-llvm.git simplify some code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26972 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index e6a9b897a12..0300d336bf6 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3435,14 +3435,11 @@ SDOperand SelectionDAGLegalize::ExpandLegalINT_TO_FP(bool isSigned, // word offset constant for Hi/Lo address computation SDOperand WordOff = DAG.getConstant(sizeof(int), TLI.getPointerTy()); // set up Hi and Lo (into buffer) address based on endian - SDOperand Hi, Lo; - if (TLI.isLittleEndian()) { - Hi = DAG.getNode(ISD::ADD, TLI.getPointerTy(), StackSlot, WordOff); - Lo = StackSlot; - } else { - Hi = StackSlot; - Lo = DAG.getNode(ISD::ADD, TLI.getPointerTy(), StackSlot, WordOff); - } + SDOperand Hi = StackSlot; + SDOperand Lo = DAG.getNode(ISD::ADD, TLI.getPointerTy(), StackSlot,WordOff); + if (TLI.isLittleEndian()) + std::swap(Hi, Lo); + // if signed map to unsigned space SDOperand Op0Mapped; if (isSigned) {