[llvm] [X86] Extend alignedstore PatFrag to cover atomic_store (PR #197861)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 04:48:02 PDT 2026
================
@@ -1254,10 +1254,11 @@ def extloadv4f16 : PatFrag<(ops node:$ptr), (extloadvf16 node:$ptr)>;
def extloadv8f16 : PatFrag<(ops node:$ptr), (extloadvf16 node:$ptr)>;
def extloadv16f16 : PatFrag<(ops node:$ptr), (extloadvf16 node:$ptr)>;
-// Like 'store', but always requires vector size alignment.
-def alignedstore : PatFrag<(ops node:$val, node:$ptr),
- (store node:$val, node:$ptr), [{
- auto *St = cast<StoreSDNode>(N);
+// Like 'store' or 'atomic_store', but always requires vector size alignment.
+def alignedstore : PatFrags<(ops node:$val, node:$ptr),
+ [(store node:$val, node:$ptr),
+ (atomic_store node:$val, node:$ptr)], [{
+ auto *St = cast<MemSDNode>(N);
return St->getAlign() >= St->getMemoryVT().getStoreSize();
}]> {
let GISelPredicateCode = [{
----------------
jofrn wrote:
Alright, let me go about seeking how to implement this. Without the frag, alignedstore or MinAlignment; for instance, vmovaps is selected for in AVX checks, and it would not be otherwise. Thanks.
https://github.com/llvm/llvm-project/pull/197861
More information about the llvm-commits
mailing list