Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.322 -> 1.323 --- Log message: Don't bother storing undef elements of BUILD_VECTOR's --- Diffs of the changes: (+9 -1) LegalizeDAG.cpp | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.322 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.323 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.322 Sat Mar 18 22:18:56 2006 +++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat Mar 18 23:46:04 2006 @@ -794,6 +794,9 @@ unsigned VectorSize = MVT::getSizeInBits(VT)/8; // Store (in the right endianness) the elements to memory. for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i) { + // Ignore undef elements. + if (Node->getOperand(i).getOpcode() == ISD::UNDEF) continue; + unsigned Offset; if (isLittleEndian) Offset = TypeByteSize*i; @@ -807,7 +810,12 @@ Node->getOperand(i), Idx, DAG.getSrcValue(NULL))); } - SDOperand StoreChain = DAG.getNode(ISD::TokenFactor, MVT::Other, Stores); + + SDOperand StoreChain; + if (!Stores.empty()) // Not all undef elements? + StoreChain = DAG.getNode(ISD::TokenFactor, MVT::Other, Stores); + else + StoreChain = DAG.getEntryNode(); // Result is a load from the stack slot. Result = DAG.getLoad(VT, StoreChain, FIPtr, DAG.getSrcValue(0)); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits