[llvm] r295782 - DAG: Check if extract_vector_elt is legal or custom

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 14:47:27 PST 2017


Author: arsenm
Date: Tue Feb 21 16:47:27 2017
New Revision: 295782

URL: http://llvm.org/viewvc/llvm-project?rev=295782&view=rev
Log:
DAG: Check if extract_vector_elt is legal or custom

Avoids test regressions in future AMDGPU commits when
more vector types are custom lowered.

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

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=295782&r1=295781&r2=295782&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Feb 21 16:47:27 2017
@@ -7882,7 +7882,7 @@ SDValue DAGCombiner::visitTRUNCATE(SDNod
     EVT SrcVT = VecSrc.getValueType();
     if (SrcVT.isVector() && SrcVT.getScalarType() == VT &&
         (!LegalOperations ||
-         TLI.isOperationLegal(ISD::EXTRACT_VECTOR_ELT, SrcVT))) {
+         TLI.isOperationLegalOrCustom(ISD::EXTRACT_VECTOR_ELT, SrcVT))) {
       SDLoc SL(N);
 
       EVT IdxVT = TLI.getVectorIdxTy(DAG.getDataLayout());




More information about the llvm-commits mailing list