[Mlir-commits] [mlir] [mlir] Fix MemRefType alignment in ConvertVectorToLLVM (PR #137389)

Lily Orth-Smith llvmlistbot at llvm.org
Wed Apr 30 13:11:10 PDT 2025


================
@@ -278,9 +313,17 @@ class VectorGatherOpConversion
 
     // Resolve alignment.
     unsigned align;
-    if (failed(getMemRefAlignment(*getTypeConverter(), memRefType, align))) {
-      return rewriter.notifyMatchFailure(gather,
-                                         "could not resolve memref alignment");
+    if (useVectorAlignment) {
+      if (failed(getVectorAlignment(*this->getTypeConverter(), vType, align))) {
+        return rewriter.notifyMatchFailure(
+            gather, "could not resolve vector alignment");
+      }
+    } else {
+      if (failed(getMemRefAlignment(*this->getTypeConverter(), memRefType,
+                                    align))) {
+        return rewriter.notifyMatchFailure(
+            gather, "could not resolve memref alignment");
+      }
----------------
electriclilies wrote:

I added a helper

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


More information about the Mlir-commits mailing list