summaryrefslogtreecommitdiffstats
path: root/mlir/test/Transforms
diff options
context:
space:
mode:
authorAhmed Taei <ataei@google.com>2020-01-14 21:18:05 +0000
committerAhmed S. Taei <ataei@google.com>2020-01-15 00:54:00 +0000
commitab035647061272b7efa39364c42e48972cebc0ab (patch)
tree209f5a3fd2b9a879446f527cfa140cb785ac8bf0 /mlir/test/Transforms
parentab9aefee9fa09957d1a3e76fcc47abda0d002255 (diff)
downloadbcm5719-llvm-ab035647061272b7efa39364c42e48972cebc0ab.tar.gz
bcm5719-llvm-ab035647061272b7efa39364c42e48972cebc0ab.zip
[mlir] : Fix ViewOp shape folder for identity affine maps
Summary: Fix the ViewOpShapeFolder in case of no affine mapping associated with a Memref construct identity mapping. Reviewers: nicolasvasilache Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72735
Diffstat (limited to 'mlir/test/Transforms')
-rw-r--r--mlir/test/Transforms/canonicalize.mlir3
1 files changed, 2 insertions, 1 deletions
diff --git a/mlir/test/Transforms/canonicalize.mlir b/mlir/test/Transforms/canonicalize.mlir
index e7be915159b..492e829a463 100644
--- a/mlir/test/Transforms/canonicalize.mlir
+++ b/mlir/test/Transforms/canonicalize.mlir
@@ -692,6 +692,7 @@ func @cast_values(%arg0: tensor<*xi32>, %arg1: memref<?xi32>) -> (tensor<2xi32>,
// CHECK-DAG: #[[VIEW_MAP2:map[0-9]+]] = affine_map<(d0, d1)[s0] -> (d0 * s0 + d1 + 15)>
// CHECK-DAG: #[[VIEW_MAP3:map[0-9]+]] = affine_map<(d0, d1, d2)[s0] -> (d0 * s0 + d1 * 7 + d2)>
// CHECK-DAG: #[[VIEW_MAP4:map[0-9]+]] = affine_map<(d0, d1) -> (d0 * 4 + d1 + 15)>
+// CHECK-DAG: #[[VIEW_MAP5:map[0-9]+]] = affine_map<(d0, d1) -> (d0 * 7 + d1)>
// CHECK-LABEL: func @view
func @view(%arg0 : index) {
@@ -736,7 +737,7 @@ func @view(%arg0 : index) {
load %5[%c0, %c0] : memref<?x4xf32, #TEST_VIEW_MAP2>
// Test: folding static alloc and memref_cast into a view.
- // CHECK: std.view %[[ALLOC_MEM]][][%c15, %c7] : memref<2048xi8> to memref<?x?xf32>
+ // CHECK: std.view %[[ALLOC_MEM]][][] : memref<2048xi8> to memref<15x7xf32, #[[VIEW_MAP5]]>
%6 = memref_cast %0 : memref<2048xi8> to memref<?xi8>
%7 = view %6[%c15][%c7] : memref<?xi8> to memref<?x?xf32>
load %7[%c0, %c0] : memref<?x?xf32>
OpenPOWER on IntegriCloud