[all-commits] [llvm/llvm-project] 4d3382: [flang] Fixed issues in nested LICM. (#192117)

Slava Zakharin via All-commits all-commits at lists.llvm.org
Tue Apr 14 13:54:41 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d33826d60acf6cc95a52b380954556a84c9cbb7
      https://github.com/llvm/llvm-project/commit/4d33826d60acf6cc95a52b380954556a84c9cbb7
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2026-04-14 (Tue, 14 Apr 2026)

  Changed paths:
    M flang/lib/Optimizer/Transforms/LoopInvariantCodeMotion.cpp
    M flang/test/Transforms/CUF/cuf-kernel-licm.fir

  Log Message:
  -----------
  [flang] Fixed issues in nested LICM. (#192117)

First change is to check the hoisting safety for all nested
operations of the candidate. This prevents hoistings of
region operations as in the added test.

When hoisting operations from nested regions we have to
check every parent region for `canMoveOutOf`, otherwise,
illegal hoisting may happen. This second change is NFC,
because all operations that support `OperationMoveOpInterface`
currently also support `LoopLikeOpInterface` and their regions
are not considered for nested hoisting. Anyway, it is worth
fixing it.



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