[mlir][bufferization] Clone simplify fails when input and result type not cast compat...
commiteaa4b6cf2914435c7549d5caa09b5f2d87082ed0
authordonald chen <62002319+cxy-1993@users.noreply.github.com>
Fri, 12 Jan 2024 15:11:00 +0000 (12 23:11 +0800)
committerGitHub <noreply@github.com>
Fri, 12 Jan 2024 15:11:00 +0000 (12 16:11 +0100)
treebe3c1cf2745066ded8d54a8a09009d300da4d6cf
parent6fdc2ce8c507d3acf4e4b65beb66cfed68045588
[mlir][bufferization] Clone simplify fails when input and result type not cast compatiable (#71310)

The simplify of bufferization.clone generates a memref.cast op, but the
checks in simplify do not verify whether the operand types and return
types of clone op is compatiable, leading to errors. This patch
addresses this issue.
mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
mlir/test/Dialect/Bufferization/canonicalize.mlir