From e68ca8d4ba34fa42dac23b2fcabccce4aebd7e2a Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Fri, 12 Sep 2014 22:16:11 +0000 Subject: [PATCH] Allow targets to custom legalize vector insertion and extraction. llvm-svn: 217711 --- llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index 8f4bce57a55d..28727a61a6a0 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -868,6 +868,10 @@ void DAGTypeLegalizer::SplitVecRes_INSERT_VECTOR_ELT(SDNode *N, SDValue &Lo, 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_EXTRACT_VECTOR_ELT(SDNode *N) { 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);