Skip to content

[mlir][MemRef] Fixed a lit test for assume alignment #140447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2025

Conversation

shay-kl
Copy link
Contributor

@shay-kl shay-kl commented May 18, 2025

Fixed a lit test that failed from my previous commit

Fixed a lit test that failed from my previous commit
@llvmbot
Copy link
Member

llvmbot commented May 18, 2025

@llvm/pr-subscribers-mlir-memref

Author: Shay Kleiman (shay-kl)

Changes

Fixed a lit test that failed from my previous commit


Full diff: https://github.com/llvm/llvm-project/pull/140447.diff

1 Files Affected:

  • (modified) mlir/test/Integration/Dialect/MemRef/assume-alignment-runtime-verification.mlir (+3-3)
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
 }

@llvmbot
Copy link
Member

llvmbot commented May 18, 2025

@llvm/pr-subscribers-mlir

Author: Shay Kleiman (shay-kl)

Changes

Fixed a lit test that failed from my previous commit


Full diff: https://github.com/llvm/llvm-project/pull/140447.diff

1 Files Affected:

  • (modified) mlir/test/Integration/Dialect/MemRef/assume-alignment-runtime-verification.mlir (+3-3)
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
 }

@AviadCo AviadCo self-requested a review May 18, 2025 12:24
@AviadCo AviadCo merged commit 4504e77 into llvm:main May 18, 2025
14 checks passed
ajaden-codes pushed a commit to Jaddyen/llvm-project that referenced this pull request Jun 6, 2025
Fixed a lit test that failed from my previous commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants