[all-commits] [llvm/llvm-project] 3398f4: [mlir][mem2reg] fix assert for indirect blocking u...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue May 26 02:29:19 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3398f4e66558c67f7a8db70982d8bdbd8ed9a52d
      https://github.com/llvm/llvm-project/commit/3398f4e66558c67f7a8db70982d8bdbd8ed9a52d
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2026-05-26 (Tue, 26 May 2026)

  Changed paths:
    M mlir/lib/Transforms/Mem2Reg.cpp
    M mlir/test/Dialect/LLVMIR/mem2reg.mlir

  Log Message:
  -----------
  [mlir][mem2reg] fix assert for indirect blocking uses inside regions (#199193)

When adding new blocking uses created by the interface of a previous
blocking uses (typically forwarding the blocking uses to the op result
users), the mem2reg framework was assuming that the new blocking uses
are in the same region as the original blocking use, which is not true
in general and lead to the assert:

`Transforms/Mem2Reg.cpp:743: void
{anonymous}::MemorySlotPromoter::removeBlockingUses(mlir::Region*):
Assertion `op->getParentRegion() == region && "all operations must still
be in the same region"' failed.`

This patch fixes this by adding the new uses into the userToBlockingUses
for the region of the new blocking uses.



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