[llvm] 4553821 - [SelectionDAG] Prevent scalable vector warning from ComputeNumSignBits on extract_vector_elt on a scalable vector.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 23:42:45 PST 2021


Author: Craig Topper
Date: 2021-02-01T23:42:03-08:00
New Revision: 4553821815ebe3101dd7c8514a5a2b45891b29a6

URL: https://github.com/llvm/llvm-project/commit/4553821815ebe3101dd7c8514a5a2b45891b29a6
DIFF: https://github.com/llvm/llvm-project/commit/4553821815ebe3101dd7c8514a5a2b45891b29a6.diff

LOG: [SelectionDAG] Prevent scalable vector warning from ComputeNumSignBits on extract_vector_elt on a scalable vector.

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 2090762e2ff4..c9bb50cb5c8b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -3922,6 +3922,9 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, const APInt &DemandedElts,
     SDValue InVec = Op.getOperand(0);
     SDValue EltNo = Op.getOperand(1);
     EVT VecVT = InVec.getValueType();
+    // ComputeNumSignBits not yet implemented for scalable vectors.
+    if (VecVT.isScalableVector())
+      break;
     const unsigned BitWidth = Op.getValueSizeInBits();
     const unsigned EltBitWidth = Op.getOperand(0).getScalarValueSizeInBits();
     const unsigned NumSrcElts = VecVT.getVectorNumElements();


        


More information about the llvm-commits mailing list