[Mlir-commits] [mlir] 24be4d5 - [mlir][vector] Add tests for scalable vectors in one-shot-bufferize.mlir (#102361)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Aug 9 05:49:52 PDT 2024


Author: Andrzej WarzyƄski
Date: 2024-08-09T13:49:49+01:00
New Revision: 24be4d5dccd9522d7dbf27dac65c90a3965a44c4

URL: https://github.com/llvm/llvm-project/commit/24be4d5dccd9522d7dbf27dac65c90a3965a44c4
DIFF: https://github.com/llvm/llvm-project/commit/24be4d5dccd9522d7dbf27dac65c90a3965a44c4.diff

LOG: [mlir][vector] Add tests for scalable vectors in one-shot-bufferize.mlir (#102361)

Added: 
    

Modified: 
    mlir/test/Dialect/Vector/one-shot-bufferize.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/test/Dialect/Vector/one-shot-bufferize.mlir b/mlir/test/Dialect/Vector/one-shot-bufferize.mlir
index 64238c3c08a6f..c2d699b9b013a 100644
--- a/mlir/test/Dialect/Vector/one-shot-bufferize.mlir
+++ b/mlir/test/Dialect/Vector/one-shot-bufferize.mlir
@@ -12,6 +12,17 @@ func.func @mask(%t0: tensor<?xf32>, %val: vector<16xf32>, %idx: index, %m0: vect
   return %0 : tensor<?xf32>
 }
 
+// CHECK-LABEL: func @mask_scalable(
+//  CHECK-SAME:     %[[t0:.*]]: memref<?xf32, strided<[?], offset: ?>>
+func.func @mask_scalable(%t0: tensor<?xf32>, %val: vector<[16]xf32>, %idx: index, %m0: vector<[16]xi1>) -> tensor<?xf32> {
+  // CHECK-NOT: alloc
+  // CHECK-NOT: copy
+  //     CHECK: vector.mask %{{.*}} { vector.transfer_write %{{.*}}, %[[t0]][%{{.*}}] : vector<[16]xf32>, memref<?xf32, strided<[?], offset: ?>> } : vector<[16]xi1>
+  %0 = vector.mask %m0 { vector.transfer_write %val, %t0[%idx] : vector<[16]xf32>, tensor<?xf32> } : vector<[16]xi1> -> tensor<?xf32>
+  //     CHECK: return %[[t0]]
+  return %0 : tensor<?xf32>
+}
+
 // -----
 
 // CHECK-ANALYSIS-LABEL: func @non_reading_xfer_write(


        


More information about the Mlir-commits mailing list