[Mlir-commits] [mlir] [mlir][vector] Adding support for volatile flags in vector loads (PR #179794)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Feb 4 16:48:34 PST 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp mlir/lib/Dialect/MemRef/Transforms/EmulateWideInt.cpp mlir/lib/Dialect/MemRef/Transforms/ExtractAddressComputations.cpp mlir/lib/Dialect/MemRef/Transforms/FoldMemRefAliasOps.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp b/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
index 6914473d0..c9f1f7102 100644
--- a/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
+++ b/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
@@ -940,7 +940,8 @@ struct LoadOpLowering : public LoadStoreOpLowering<memref::LoadOp> {
 
     // Bail out if volatile flag is set
     if (loadOp.getVolatile())
-      return rewriter.notifyMatchFailure(loadOp, "volatile loads not supported");
+      return rewriter.notifyMatchFailure(loadOp,
+                                         "volatile loads not supported");
 
     // Per memref.load spec, the indices must be in-bounds:
     // 0 <= idx < dim_size, and additionally all offsets are non-negative,
diff --git a/mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp b/mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp
index b3916ea81..b66eeef5c 100644
--- a/mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp
+++ b/mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp
@@ -541,7 +541,8 @@ IntLoadOpPattern::matchAndRewrite(memref::LoadOp loadOp, OpAdaptor adaptor,
                                   ConversionPatternRewriter &rewriter) const {
   // Bail out if volatile flag is set
   if (loadOp.getVolatile())
-    return rewriter.notifyMatchFailure(loadOp, "volatile loads not yet supported");
+    return rewriter.notifyMatchFailure(loadOp,
+                                       "volatile loads not yet supported");
 
   auto loc = loadOp.getLoc();
   auto memrefType = cast<MemRefType>(loadOp.getMemref().getType());
@@ -674,7 +675,8 @@ LoadOpPattern::matchAndRewrite(memref::LoadOp loadOp, OpAdaptor adaptor,
                                ConversionPatternRewriter &rewriter) const {
   // Bail out if volatile flag is set
   if (loadOp.getVolatile())
-    return rewriter.notifyMatchFailure(loadOp, "volatile loads not yet supported");
+    return rewriter.notifyMatchFailure(loadOp,
+                                       "volatile loads not yet supported");
 
   auto memrefType = cast<MemRefType>(loadOp.getMemref().getType());
   if (memrefType.getElementType().isSignlessInteger())
@@ -743,7 +745,8 @@ ImageLoadOpPattern::matchAndRewrite(memref::LoadOp loadOp, OpAdaptor adaptor,
                                     ConversionPatternRewriter &rewriter) const {
   // Bail out if volatile flag is set
   if (loadOp.getVolatile())
-    return rewriter.notifyMatchFailure(loadOp, "volatile loads not yet supported");
+    return rewriter.notifyMatchFailure(loadOp,
+                                       "volatile loads not yet supported");
 
   auto memrefType = cast<MemRefType>(loadOp.getMemref().getType());
 
@@ -832,7 +835,8 @@ IntStoreOpPattern::matchAndRewrite(memref::StoreOp storeOp, OpAdaptor adaptor,
                                    ConversionPatternRewriter &rewriter) const {
   // Bail out if volatile flag is set
   if (storeOp.getVolatile())
-    return rewriter.notifyMatchFailure(storeOp, "volatile stores not yet supported");
+    return rewriter.notifyMatchFailure(storeOp,
+                                       "volatile stores not yet supported");
 
   auto memrefType = cast<MemRefType>(storeOp.getMemref().getType());
   if (!memrefType.getElementType().isSignlessInteger())
@@ -1036,7 +1040,8 @@ StoreOpPattern::matchAndRewrite(memref::StoreOp storeOp, OpAdaptor adaptor,
                                 ConversionPatternRewriter &rewriter) const {
   // Bail out if volatile flag is set
   if (storeOp.getVolatile())
-    return rewriter.notifyMatchFailure(storeOp, "volatile stores not yet supported");
+    return rewriter.notifyMatchFailure(storeOp,
+                                       "volatile stores not yet supported");
 
   auto memrefType = cast<MemRefType>(storeOp.getMemref().getType());
   if (memrefType.getElementType().isSignlessInteger())

``````````

</details>


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


More information about the Mlir-commits mailing list