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

Fixed a lit test that failed from my previous commit
This commit is contained in:
Shay Kleiman
2025-05-18 15:25:01 +03:00
committed by GitHub
parent ffb9bbfd07
commit 4504e77550

View File

@@ -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
}