[all-commits] [llvm/llvm-project] c50fec: [mlir] Fix region simplification bug when later bl...

Ben Howe via All-commits all-commits at lists.llvm.org
Wed Sep 4 12:37:35 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c50fecaaaabcf1598dc25fbde24c8352745b4ac9
      https://github.com/llvm/llvm-project/commit/c50fecaaaabcf1598dc25fbde24c8352745b4ac9
  Author: Ben Howe <141149032+bmhowe23 at users.noreply.github.com>
  Date:   2024-09-04 (Wed, 04 Sep 2024)

  Changed paths:
    M mlir/lib/Transforms/Utils/RegionUtils.cpp
    M mlir/test/Transforms/canonicalize-block-merge.mlir

  Log Message:
  -----------
  [mlir] Fix region simplification bug when later blocks use prior block argument values (#97960)

This fixes #94520 by ensuring that any if any block arguments are being
used outside of the original block that the block is not considered a
candidate for merging.

More details: the root cause of the issue described in #94520 was that
`^bb2` and `^bb5` were being merged despite `%4` (an argument to `^bb2`)
was being used later in `^bb7`. When the block merge occurred, that
unintentionally changed the value of `%4` for all downstream code. This
change prevents that from happening.



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