Endianness does not affect the order of vector fields. This fixes
authorChris Lattner <sabre@nondot.org>
Wed, 22 Mar 2006 01:46:54 +0000 (01:46 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 22 Mar 2006 01:46:54 +0000 (01:46 +0000)
SingleSource/UnitTests/Vector/build.c

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

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 5a1aef7a7d4915ce518714e9078e7f9c7919fbec..1a951bb7044f2689f74014aae21cbed7214e0896 100644 (file)
@@ -3155,7 +3155,6 @@ SDOperand SelectionDAGLegalize::ExpandBUILD_VECTOR(SDNode *Node) {
   
   // Emit a store of each element to the stack slot.
   std::vector<SDOperand> Stores;
-  bool isLittleEndian = TLI.isLittleEndian();
   unsigned TypeByteSize = 
     MVT::getSizeInBits(Node->getOperand(0).getValueType())/8;
   unsigned VectorSize = MVT::getSizeInBits(VT)/8;
@@ -3164,11 +3163,7 @@ SDOperand SelectionDAGLegalize::ExpandBUILD_VECTOR(SDNode *Node) {
     // Ignore undef elements.
     if (Node->getOperand(i).getOpcode() == ISD::UNDEF) continue;
     
-    unsigned Offset;
-    if (isLittleEndian) 
-      Offset = TypeByteSize*i;
-    else
-      Offset = TypeByteSize*(e-i-1);
+    unsigned Offset = TypeByteSize*i;
     
     SDOperand Idx = DAG.getConstant(Offset, FIPtr.getValueType());
     Idx = DAG.getNode(ISD::ADD, FIPtr.getValueType(), FIPtr, Idx);