[llvm] [GVN] Handle scalable vectors with the same size in VNCoercion (PR #123984)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 00:08:15 PST 2025


================
@@ -118,7 +122,8 @@ Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy,
   // If the loaded value is smaller than the available value, then we can
   // extract out a piece from it.  If the available value is too small, then we
   // can't do anything.
-  assert(StoredValSize >= LoadedValSize &&
+  assert(!StoredValSize.isScalable() && !LoadedValSize.isScalable() &&
+         StoredValSize >= LoadedValSize &&
----------------
davemgreen wrote:

The intent is to check that we do not see any scalable vectors at this point, they should have been handled above.

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


More information about the llvm-commits mailing list