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:
parent
66f023a057
commit
7bff244b8b
|
@ -66,6 +66,8 @@ def LHLO_PredOrIntBuffer : MemRefOf<[HLO_Int, HLO_Pred]>;
|
||||||
|
|
||||||
def LHLO_Buffer : MemRefOf<[AnyFloat, AnySignlessInteger, AnyComplex]>;
|
def LHLO_Buffer : MemRefOf<[AnyFloat, AnySignlessInteger, AnyComplex]>;
|
||||||
|
|
||||||
|
def LHLO_ExtentBuffer : MemRefRankOf<[AnySignlessInteger, Index], [1]>;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// LMHLO nullary op definitions.
|
// LMHLO nullary op definitions.
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
@ -467,7 +469,7 @@ def ReshapeMemRefCastOp: Op<LHLO_Dialect, "reshape_memref_cast", [
|
||||||
|
|
||||||
let arguments = (ins
|
let arguments = (ins
|
||||||
AnyRankedOrUnrankedMemRef:$operand,
|
AnyRankedOrUnrankedMemRef:$operand,
|
||||||
MemRefRankOf<[AnySignlessInteger], [1]>:$shape
|
LHLO_ExtentBuffer:$shape
|
||||||
);
|
);
|
||||||
let results = (outs AnyRankedOrUnrankedMemRef:$result);
|
let results = (outs AnyRankedOrUnrankedMemRef:$result);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue