[Mlir-commits] [mlir] Folding extract_strided_metadata input into reinterpret_cast on constant layout (PR #134845)
Matthias Springer
llvmlistbot at llvm.org
Wed Apr 9 05:55:33 PDT 2025
================
@@ -2045,44 +2050,57 @@ struct ReinterpretCastOpExtractStridedMetadataFolder
op.getSource().getDefiningOp<ExtractStridedMetadataOp>();
if (!extractStridedMetadata)
return failure();
+
// Check if the reinterpret cast reconstructs a memref with the exact same
// properties as the extract strided metadata.
-
- // First, check that the strides are the same.
SmallVector<OpFoldResult> extractStridesOfr =
----------------
matthias-springer wrote:
This can be moved into the lambda. Or even better: remove it entirely and call these functions inside of `llvm::equal`.
https://github.com/llvm/llvm-project/pull/134845
More information about the Mlir-commits
mailing list