[llvm] [MemoryLocation] Size Scalable Masked MemOps (PR #154785)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 21 08:39:19 PDT 2025


================
@@ -150,6 +150,29 @@ MemoryLocation::getForDest(const CallBase *CB, const TargetLibraryInfo &TLI) {
   return MemoryLocation::getBeforeOrAfter(UsedV, CB->getAAMetadata());
 }
 
+static std::optional<FixedVectorType *>
+getFixedTypeFromScalableMemOp(Value *Mask, Type *Ty) {
+  auto ActiveLaneMask = dyn_cast<IntrinsicInst>(Mask);
+  if (!ActiveLaneMask ||
+      ActiveLaneMask->getIntrinsicID() != Intrinsic::get_active_lane_mask)
+    return std::nullopt;
+
+  auto ScalableTy = dyn_cast<ScalableVectorType>(Ty);
----------------
david-arm wrote:

I think we can probably remove this restriction as the mask works equally well for fixed-width vectors too.

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


More information about the llvm-commits mailing list