[llvm] [TableGen][AArch64] Relax EnforceVectorSubVectorTypeIs for mixing fixed and scalable vectors. (PR #228552)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 2 11:59:55 PDT 2026
================
@@ -657,7 +657,10 @@ bool TypeInfer::EnforceVectorSubVectorTypeIs(TypeSetByHwMode &Vec,
return false;
if (B.getVectorElementType() != P.getVectorElementType())
return false;
- return B.getVectorMinNumElements() < P.getVectorMinNumElements();
+ // We can't tell if a fixed vector is bigger than a scalable vector without
+ // knowing vscale.
+ return B.isScalableVector() != P.isScalableVector() ||
+ B.getVectorMinNumElements() < P.getVectorMinNumElements();
----------------
s-barannikov wrote:
Maybe check that if P is scalable (and B is fixed), then `B.getVectorMinNumElements() <= P.getVectorMinNumElements()` (less or equal instead of strictly less).
https://github.com/llvm/llvm-project/pull/228552
More information about the llvm-commits
mailing list