[Mlir-commits] [mlir] 8d20310 - Revert "[mlir][memref] Fix offset update in emulating narrow type for strided memref (#67714)"

Stella Laurenzo llvmlistbot at llvm.org
Fri Sep 29 18:49:58 PDT 2023


Author: Stella Laurenzo
Date: 2023-09-29T18:49:33-07:00
New Revision: 8d203100e898f6822c9feba65578df0d267dd247

URL: https://github.com/llvm/llvm-project/commit/8d203100e898f6822c9feba65578df0d267dd247
DIFF: https://github.com/llvm/llvm-project/commit/8d203100e898f6822c9feba65578df0d267dd247.diff

LOG: Revert "[mlir][memref] Fix offset update in emulating narrow type for strided memref (#67714)"

This reverts commit 35ec6ea6441d892e6d43a89683b35abb9cf9e0e7.

Breaks downstream narrow type execution tests.

Added: 
    

Modified: 
    mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp b/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp
index 702a6f6d527f9d8..2a524ceb9db887b 100644
--- a/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp
+++ b/mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp
@@ -272,12 +272,6 @@ void memref::populateMemRefNarrowTypeEmulationConversions(
 
         StridedLayoutAttr layoutAttr;
         if (offset != 0) {
-          // Check if the number of bytes are a multiple of the loadStoreWidth
-          // and if so, divide it by the loadStoreWidth to get the offset.
-          if ((offset * width) % loadStoreWidth != 0)
-            return std::nullopt;
-          offset = (offset * width) / loadStoreWidth;
-
           layoutAttr = StridedLayoutAttr::get(ty.getContext(), offset,
                                               ArrayRef<int64_t>{1});
         }


        


More information about the Mlir-commits mailing list