[all-commits] [llvm/llvm-project] 49212d: [Flang] Fix for replacing loop uses in LoopVersion...

David Green via All-commits all-commits at lists.llvm.org
Sat Jan 20 14:16:16 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 49212d1601a1f0e34a8867eb1ad2e394f91cade1
      https://github.com/llvm/llvm-project/commit/49212d1601a1f0e34a8867eb1ad2e394f91cade1
  Author: David Green <david.green at arm.com>
  Date:   2024-01-20 (Sat, 20 Jan 2024)

  Changed paths:
    M flang/lib/Optimizer/Transforms/LoopVersioning.cpp
    M flang/test/Transforms/loop-versioning.fir

  Log Message:
  -----------
  [Flang] Fix for replacing loop uses in LoopVersioning pass (#77899)

The added test case has a loop that is versioned, which has a use of the
loop in an if block after the loop. The current code replaces all uses
of the loop with the new version If, but only if the parent blocks
match. As far as I can see it should be safe to replace all the uses,
then construct the result for the If with op.op.




More information about the All-commits mailing list