[Mlir-commits] [mlir] [mlir][MemRef] Fixed a lit test for assume alignment (PR #140447)

Shay Kleiman llvmlistbot at llvm.org
Sun May 18 04:58:25 PDT 2025


https://github.com/shay-kl created https://github.com/llvm/llvm-project/pull/140447

Fixed a lit test that failed from my previous commit

>From f6cbac4622b5477f05fa5b8ad57039a9dec94d75 Mon Sep 17 00:00:00 2001
From: Shay Kleiman <shay.kleiman at mobileye.com>
Date: Sun, 18 May 2025 14:53:44 +0300
Subject: [PATCH] Fixed Assume Alignment lit test

Fixed a lit test that failed from my previous commit
---
 .../MemRef/assume-alignment-runtime-verification.mlir       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mlir/test/Integration/Dialect/MemRef/assume-alignment-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/assume-alignment-runtime-verification.mlir
index 394648d1b8bfa..8f74976c59773 100644
--- a/mlir/test/Integration/Dialect/MemRef/assume-alignment-runtime-verification.mlir
+++ b/mlir/test/Integration/Dialect/MemRef/assume-alignment-runtime-verification.mlir
@@ -10,7 +10,7 @@ func.func @main() {
   // This buffer is properly aligned. There should be no error.
   // CHECK-NOT: ^ memref is not aligned to 8
   %alloc = memref.alloca() : memref<5xf64>
-  memref.assume_alignment %alloc, 8 : memref<5xf64>
+  %0 = memref.assume_alignment %alloc, 8 : memref<5xf64>
 
   // Construct a memref descriptor with a pointer that is not aligned to 4.
   // This cannot be done with just the memref dialect. We have to resort to
@@ -28,10 +28,10 @@ func.func @main() {
   %buffer = builtin.unrealized_conversion_cast %10 : !llvm.struct<(ptr, ptr, i64, array<1 x i64>, array<1 x i64>)> to memref<1xf32>
 
   //      CHECK: ERROR: Runtime op verification failed
-  // CHECK-NEXT: "memref.assume_alignment"(%{{.*}}) <{alignment = 4 : i32}> : (memref<1xf32>) -> ()
+  // CHECK-NEXT: %[[ASSUME:.*]] = "memref.assume_alignment"(%{{.*}}) <{alignment = 4 : i32}> : (memref<1xf32>)
   // CHECK-NEXT: ^ memref is not aligned to 4
   // CHECK-NEXT: Location: loc({{.*}})
-  memref.assume_alignment %buffer, 4 : memref<1xf32>
+  %assume = memref.assume_alignment %buffer, 4 : memref<1xf32>
 
   return
 }



More information about the Mlir-commits mailing list