[llvm-branch-commits] [llvm-branch] r97180 - /llvm/branches/Apple/Hermes/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Dan Gohman gohman at apple.com
Thu Feb 25 15:28:17 PST 2010


Author: djg
Date: Thu Feb 25 17:28:17 2010
New Revision: 97180

URL: http://llvm.org/viewvc/llvm-project?rev=97180&view=rev
Log:
$ svn merge -c 97165 https://djg@llvm.org/svn/llvm-project/llvm/trunk
--- Merging r97165 into '.':
U    lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Modified:
    llvm/branches/Apple/Hermes/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Modified: llvm/branches/Apple/Hermes/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Hermes/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=97180&r1=97179&r2=97180&view=diff
==============================================================================
--- llvm/branches/Apple/Hermes/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/branches/Apple/Hermes/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Feb 25 17:28:17 2010
@@ -1512,7 +1512,6 @@
   // the result as a vector.
   // Create the stack frame object.
   EVT VT = Node->getValueType(0);
-  EVT OpVT = Node->getOperand(0).getValueType();
   EVT EltVT = VT.getVectorElementType();
   DebugLoc dl = Node->getDebugLoc();
   SDValue FIPtr = DAG.CreateStackTemporary(VT);
@@ -1532,8 +1531,9 @@
     SDValue Idx = DAG.getConstant(Offset, FIPtr.getValueType());
     Idx = DAG.getNode(ISD::ADD, dl, FIPtr.getValueType(), FIPtr, Idx);
 
-    // If EltVT smaller than OpVT, only store the bits necessary.
-    if (!OpVT.isVector() && EltVT.bitsLT(OpVT)) {
+    // If the destination vector element type is narrower than the source
+    // element type, only store the bits necessary.
+    if (EltVT.bitsLT(Node->getOperand(i).getValueType().getScalarType())) {
       Stores.push_back(DAG.getTruncStore(DAG.getEntryNode(), dl,
                           Node->getOperand(i), Idx, SV, Offset, EltVT));
     } else





More information about the llvm-branch-commits mailing list