Those fixes were taken from https://reviews.llvm.org/D137338
getBufferType
tensor::isCastLikeExtractSliceOp