Do not endian swap the operands to a store if the operands came from a vector.
authorChris Lattner <sabre@nondot.org>
Fri, 31 Mar 2006 18:20:46 +0000 (18:20 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 31 Mar 2006 18:20:46 +0000 (18:20 +0000)
This fixes UnitTests/Vector/simple.c with altivec.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27298 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 068a71ef8a781a29a6501b2fd8fbdaaef6a90977..443bba5fc4e7fcdc361d2ac1e2a4f294195568f9 100644 (file)
@@ -1450,10 +1450,10 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
       } else {
         ExpandOp(Node->getOperand(1), Lo, Hi);
         IncrementSize = MVT::getSizeInBits(Hi.getValueType())/8;
-      }
 
-      if (!TLI.isLittleEndian())
-        std::swap(Lo, Hi);
+        if (!TLI.isLittleEndian())
+          std::swap(Lo, Hi);
+      }
 
       Lo = DAG.getNode(ISD::STORE, MVT::Other, Tmp1, Lo, Tmp2,
                        Node->getOperand(3));