[llvm] r217711 - Allow targets to custom legalize vector insertion and extraction.

Owen Anderson resistor at mac.com
Fri Sep 12 15:16:11 PDT 2014


Author: resistor
Date: Fri Sep 12 17:16:11 2014
New Revision: 217711

URL: http://llvm.org/viewvc/llvm-project?rev=217711&view=rev
Log:
Allow targets to custom legalize vector insertion and extraction.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=217711&r1=217710&r2=217711&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Fri Sep 12 17:16:11 2014
@@ -868,6 +868,10 @@ void DAGTypeLegalizer::SplitVecRes_INSER
     return;
   }
 
+  // See if the target wants to custom expand this node.
+  if (CustomLowerNode(N, N->getValueType(0), true))
+    return;
+
   // Spill the vector to the stack.
   EVT VecVT = Vec.getValueType();
   EVT EltVT = VecVT.getVectorElementType();
@@ -1349,6 +1353,10 @@ SDValue DAGTypeLegalizer::SplitVecOp_EXT
                                                   Idx.getValueType())), 0);
   }
 
+  // See if the target wants to custom expand this node.
+  if (CustomLowerNode(N, N->getValueType(0), true))
+    return SDValue();
+
   // Store the vector to the stack.
   EVT EltVT = VecVT.getVectorElementType();
   SDLoc dl(N);





More information about the llvm-commits mailing list