summaryrefslogtreecommitdiffstats
path: root/mlir/test/Conversion/StandardToLLVM
diff options
context:
space:
mode:
authorNicolas Vasilache <ntv@google.com>2019-10-02 13:24:27 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-10-02 13:25:05 -0700
commit9604bb6269bc5ff87c85dad7c8aa4b4f5f0f4696 (patch)
tree49318fefc1a1006b953f268bc278a99c37030cd5 /mlir/test/Conversion/StandardToLLVM
parentf294e0e513464b97ae1bb2f9532979f8698c441e (diff)
downloadbcm5719-llvm-9604bb6269bc5ff87c85dad7c8aa4b4f5f0f4696.tar.gz
bcm5719-llvm-9604bb6269bc5ff87c85dad7c8aa4b4f5f0f4696.zip
Extract MemRefType::getStridesAndOffset as a free function and fix dynamic offset determination.
This also adds coverage with a missing test, which uncovered a bug in the conditional for testing whether an offset is dynamic or not. PiperOrigin-RevId: 272505798
Diffstat (limited to 'mlir/test/Conversion/StandardToLLVM')
-rw-r--r--mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir6
1 files changed, 6 insertions, 0 deletions
diff --git a/mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir b/mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
index fa9a17302bd..0f40509c48e 100644
--- a/mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
+++ b/mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
@@ -11,3 +11,9 @@ func @address_space(%arg0 : memref<32xf32, (d0) -> (d0), 7>) {
std.return
}
+// CHECK-LABEL: func @strided_memref(
+func @strided_memref(%ind: index) {
+ %0 = alloc()[%ind] : memref<32x64xf32, (i, j)[M] -> (32 + M * i + j)>
+ std.return
+}
+
OpenPOWER on IntegriCloud