[llvm] [AArch64][SVE] - Fix crash Possible incorrect use of EVT::getVectorNumElements(). (PR #218733)

Pawan Nirpal via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 01:27:04 PDT 2026


================
@@ -4712,7 +4712,7 @@ SDValue DAGCombiner::visitSUBSAT(SDNode *N) {
   // Narrow a vXiN USUBSAT to a smaller type when both operands are known
   // to fit in fewer bits. This allows targets with native narrow USUBSAT
   // (e.g. vpsubusb/vpsubusw) to avoid emulation with vpmaxu + vsub.
-  if (!IsSigned && VT.isVector() && VT.isSimple()) {
+  if (!IsSigned && VT.isFixedLengthVector() && VT.isSimple()) {
----------------
pawan-nirpal-031 wrote:

@efriedma-quic I'll restrict this for fixed vectors and add a todo, for the authors of this combine to evaluate for scalable vectors.  



https://github.com/llvm/llvm-project/pull/218733


More information about the llvm-commits mailing list