[mlir][Vector] Add nontemporal attribute, mirroring memref (#76752)
Since vector loads and stores from scalar memrefs translate to llvm.load/store, add the ability to tag said loads and stores as nontemporal. This mirrors functionality available in memref.load/store.
This commit is contained in:
committed by
GitHub
parent
dc03382d3e
commit
5cfe24eee4
@@ -192,7 +192,9 @@ static void replaceLoadOrStoreOp(vector::LoadOp loadOp,
|
||||
vector::LoadOpAdaptor adaptor,
|
||||
VectorType vectorTy, Value ptr, unsigned align,
|
||||
ConversionPatternRewriter &rewriter) {
|
||||
rewriter.replaceOpWithNewOp<LLVM::LoadOp>(loadOp, vectorTy, ptr, align);
|
||||
rewriter.replaceOpWithNewOp<LLVM::LoadOp>(loadOp, vectorTy, ptr, align,
|
||||
/*volatile_=*/false,
|
||||
loadOp.getNontemporal());
|
||||
}
|
||||
|
||||
static void replaceLoadOrStoreOp(vector::MaskedLoadOp loadOp,
|
||||
@@ -208,7 +210,8 @@ static void replaceLoadOrStoreOp(vector::StoreOp storeOp,
|
||||
VectorType vectorTy, Value ptr, unsigned align,
|
||||
ConversionPatternRewriter &rewriter) {
|
||||
rewriter.replaceOpWithNewOp<LLVM::StoreOp>(storeOp, adaptor.getValueToStore(),
|
||||
ptr, align);
|
||||
ptr, align, /*volatile_=*/false,
|
||||
storeOp.getNontemporal());
|
||||
}
|
||||
|
||||
static void replaceLoadOrStoreOp(vector::MaskedStoreOp storeOp,
|
||||
|
||||
Reference in New Issue
Block a user