[llvm] 3eed051 - [SelectionDAG] NFC: Remove redundant assert in ComputeNumSignBits.

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 20 01:10:18 PST 2026


Author: Sander de Smalen
Date: 2026-01-20T09:09:15Z
New Revision: 3eed0511c044242ac05508e44585dd21b59dffbd

URL: https://github.com/llvm/llvm-project/commit/3eed0511c044242ac05508e44585dd21b59dffbd
DIFF: https://github.com/llvm/llvm-project/commit/3eed0511c044242ac05508e44585dd21b59dffbd.diff

LOG: [SelectionDAG] NFC: Remove redundant assert in ComputeNumSignBits.

This assert should not have existed, because just below it the code
bails out for that same condition. The case of the vector being a
scalable vector also shouldn't cause the compiler to crash with an
assertion failure, and instead it should just avoid analysing the
expression.

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 a6e1889f49ac4..4f1054af481d9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -5178,7 +5178,6 @@ unsigned SelectionDAG::ComputeNumSignBits(SDValue Op, const APInt &DemandedElts,
     return Tmp;
   }
   case ISD::EXTRACT_VECTOR_ELT: {
-    assert(!VT.isScalableVector());
     SDValue InVec = Op.getOperand(0);
     SDValue EltNo = Op.getOperand(1);
     EVT VecVT = InVec.getValueType();


        


More information about the llvm-commits mailing list