[llvm] 4105794 - [SDAG] Assert we don't see scalable VECTOR_SHUFFLES

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 08:19:03 PST 2022


Author: Philip Reames
Date: 2022-11-17T08:18:51-08:00
New Revision: 4105794e66160d023ca1bc789b5f076cecd4e051

URL: https://github.com/llvm/llvm-project/commit/4105794e66160d023ca1bc789b5f076cecd4e051
DIFF: https://github.com/llvm/llvm-project/commit/4105794e66160d023ca1bc789b5f076cecd4e051.diff

LOG: [SDAG] Assert we don't see scalable VECTOR_SHUFFLES

It was pointed out in review of D137140 that this case should be impossible.  This patch converts an existing bailout into an assert instead.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 29322891eed28..8c7e975639381 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2781,9 +2781,7 @@ SDValue SelectionDAG::getSplatSourceVector(SDValue V, int &SplatIdx) {
     SplatIdx = 0;
     return V;
   case ISD::VECTOR_SHUFFLE: {
-    if (VT.isScalableVector())
-      return SDValue();
-
+    assert(!VT.isScalableVector());
     // Check if this is a shuffle node doing a splat.
     // TODO - remove this and rely purely on SelectionDAG::isSplatValue,
     // getTargetVShiftNode currently struggles without the splat source.


        


More information about the llvm-commits mailing list