[all-commits] [llvm/llvm-project] d88a3a: [mlir][vector] Remove redundant shape_cast(shape_c...

James Newling via All-commits all-commits at lists.llvm.org
Wed Apr 16 10:09:19 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d88a3a36ad26e68281873fab9a35389f6eb5c919
      https://github.com/llvm/llvm-project/commit/d88a3a36ad26e68281873fab9a35389f6eb5c919
  Author: James Newling <james.newling at gmail.com>
  Date:   2025-04-16 (Wed, 16 Apr 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h
    M mlir/lib/Dialect/Vector/Transforms/VectorDropLeadUnitDim.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp

  Log Message:
  -----------
  [mlir][vector] Remove redundant shape_cast(shape_cast(x)) pattern (#135447)

This PR removes one OpRewritePattern `shape_cast(shape_cast(x)) -> x`
that is already handled by `ShapeCastOp::fold`.

Note that this might affect downstream users who indirectly call
`populateShapeCastFoldingPatterns(RewritePatternSet &patterns,
PatternBenefit)` and then use `patterns` with a `GreedyRewriteConfig
config` that has `config.fold = false`. (only user I've checked is IREE,
that never uses config.fold = false).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list