summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-23 05:29:04 +0000
committerChris Lattner <sabre@nondot.org>2006-03-23 05:29:04 +0000
commit9ea1b3f9fdca2e288d002b7fc8cf3e4f41b46c64 (patch)
treecb37533d719160ca350d809f57022a096979f01c /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
parent811dd8d009491b3e83d408294eca8a5a3c5ac896 (diff)
downloadbcm5719-llvm-9ea1b3f9fdca2e288d002b7fc8cf3e4f41b46c64.tar.gz
bcm5719-llvm-9ea1b3f9fdca2e288d002b7fc8cf3e4f41b46c64.zip
simplify some code
llvm-svn: 26972
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index e6a9b897a12..0300d336bf6 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud