[mlir][vector] Fix double rank reducing folding bug
In https://reviews.llvm.org/D133883, we changed the `FoldExtractSliceIntoTransferRead` pattern from requiring full identity map to minor identity map. This effectively allows rank reducing `vector.transfer_read` ops. However, the logic for checking `tensor.extract_slice` rank reducing still looks at the vector rank, which now could be smaller than the `tensor.extract_slice`'s output tensor rank. It ends up we can have incorrect index cacluation after folding due to this double rank reducing behavior. Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D134984
Loading
Please sign in to comment