[Mlir-commits] [mlir] [mlir][vector] Restrict DropInnerMostUnitDimsTransferRead (PR #94904)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Jun 11 07:32:03 PDT 2024
================
@@ -1293,6 +1293,21 @@ class DropInnerMostUnitDimsTransferRead
if (dimsToDrop == 0)
return failure();
+ // Make sure that the indixes to be dropped are equal 0.
+ // TODO: Deal with cases when the indices are not 0.
+ auto isZeroIdx = [](Value idx) {
+ Attribute attr;
+ APInt value;
+ if (!matchPattern(idx, m_Constant(&attr)))
+ return false;
+ if (matchPattern(attr, m_ConstantInt(&value)))
+ if (!value.isZero())
+ return false;
+ return true;
+ };
----------------
banach-space wrote:
Oh, nice, thanks for the suggestion!
https://github.com/llvm/llvm-project/pull/94904
More information about the Mlir-commits
mailing list