Allow index typed memrefs in reshape_memref_cast.

With the recent change to allow memref of index in MLIR core, we should also
allow this in the mhlo dialect.

PiperOrigin-RevId: 324879354
This commit is contained in:
Stephan Herhut 2020-08-04 13:33:31 -07:00 committed by TensorFlow MLIR Team
parent 66f023a057
commit 7bff244b8b
1 changed files with 3 additions and 1 deletions

View File

@ -66,6 +66,8 @@ def LHLO_PredOrIntBuffer : MemRefOf<[HLO_Int, HLO_Pred]>;
def LHLO_Buffer : MemRefOf<[AnyFloat, AnySignlessInteger, AnyComplex]>;
def LHLO_ExtentBuffer : MemRefRankOf<[AnySignlessInteger, Index], [1]>;
//===----------------------------------------------------------------------===//
// LMHLO nullary op definitions.
//===----------------------------------------------------------------------===//
@ -467,7 +469,7 @@ def ReshapeMemRefCastOp: Op<LHLO_Dialect, "reshape_memref_cast", [
let arguments = (ins
AnyRankedOrUnrankedMemRef:$operand,
MemRefRankOf<[AnySignlessInteger], [1]>:$shape
LHLO_ExtentBuffer:$shape
);
let results = (outs AnyRankedOrUnrankedMemRef:$result);