Fix verification of zero-dim memref in affine.load/affine.store/std.load/std.store
authorDiego Caballero <diego.caballero@intel.com>
Wed, 7 Aug 2019 17:31:14 +0000 (10:31 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Wed, 7 Aug 2019 17:31:49 +0000 (10:31 -0700)
commitc6a006d4c7987accbbed37b1462f2c7a4411e4bc
treec78adfc48642a6bfbc11809a28a21dfac49be2ca
parentb15e2aec753cb6fc50b78ef540c29d501f38b09a
Fix verification of zero-dim memref in affine.load/affine.store/std.load/std.store

Verification complained when using zero-dimensional memrefs in
affine.load, affine.store, std.load and std.store. This PR extends
verification so that those memrefs can be used.

Closes tensorflow/mlir#58

COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/58 from dcaballe:dcaballe/zero-dim 49bcdcd45c52c48beca776431328e5ce551dfa9e
PiperOrigin-RevId: 262164916
mlir/include/mlir/IR/AffineMap.h
mlir/include/mlir/IR/Builders.h
mlir/lib/AffineOps/AffineOps.cpp
mlir/lib/IR/Builders.cpp
mlir/lib/IR/MLIRContext.cpp
mlir/test/AffineOps/load-store.mlir
mlir/test/IR/core-ops.mlir
mlir/test/IR/invalid.mlir