[llvm] [LV] isScalarWithPredication to check for interleaved accesses (PR #194579)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 03:57:24 PDT 2026


=?utf-8?q?Gaƫtan?= Bossu <gaetan.bossu at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/194579 at github.com>


================
@@ -59,20 +59,25 @@ static cl::opt<bool> ForceTargetSupportsMaskedMemoryOps(
     cl::desc("Assume the target supports masked memory operations (used for "
              "testing)."));
 
-bool VFSelectionContext::isLegalMaskedStore(Type *DataType, Value *Ptr,
-                                            Align Alignment,
-                                            unsigned AddressSpace) const {
-  return Legal->isConsecutivePtr(DataType, Ptr) &&
-         (ForceTargetSupportsMaskedMemoryOps ||
-          TTI.isLegalMaskedStore(DataType, Alignment, AddressSpace));
-}
+static cl::opt<bool> ForceTargetSupportsGatherScatterOps(
----------------
david-arm wrote:

Well https://github.com/llvm/llvm-project/pull/195042 seems to be doing a lot more than a simple NFC refactor of isLegalMaskedLoad/Store. It's also changing `isConsecutivePtr`, which might be best left to this PR where we can discuss it? I was thinking purely about introducing `isLegalMaskedLoadOrStore` without the call to `isConsecutivePtr` because that seems like a useful change by itself without being linked to this work. The new `ForceTargetSupportsGatherScatterOps` option also seems useful as a purely independent change.

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


More information about the llvm-commits mailing list