[llvm] [LV] Add `-force-target-supports-masked-memory-ops` option (PR #184325)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 04:41:06 PST 2026
================
@@ -1178,16 +1183,18 @@ class LoopVectorizationCostModel {
/// for the given \p DataType and kind of access to \p Ptr.
bool isLegalMaskedStore(Type *DataType, Value *Ptr, Align Alignment,
unsigned AddressSpace) const {
- return Legal->isConsecutivePtr(DataType, Ptr) &&
- TTI.isLegalMaskedStore(DataType, Alignment, AddressSpace);
+ return ForceTargetSupportsMaskedMemoryOps ||
----------------
lukel97 wrote:
Oh yup I missed this. FWIW I have this exact patch in my own git stash, but the diff is:
```diff
@@ -1181,16 +1187,16 @@ public:
/// for the given \p DataType and kind of access to \p Ptr.
bool isLegalMaskedStore(Type *DataType, Value *Ptr, Align Alignment,
unsigned AddressSpace) const {
- return Legal->isConsecutivePtr(DataType, Ptr) &&
- TTI.isLegalMaskedStore(DataType, Alignment, AddressSpace);
+ return (Legal->isConsecutivePtr(DataType, Ptr) &&
+ TTI.isLegalMaskedStore(DataType, Alignment, AddressSpace)) || ForceTargetSupportsMaskedLoadStore;
}
```
https://github.com/llvm/llvm-project/pull/184325
More information about the llvm-commits
mailing list