[all-commits] [llvm/llvm-project] 3f8be1: [LoopInterchange] Handle lcssa PHIs with multiple ...

CongzheUalberta via All-commits all-commits at lists.llvm.org
Tue May 11 18:31:48 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f8be15f2911a3d3645030911be83a115bfe9e5c
      https://github.com/llvm/llvm-project/commit/3f8be15f2911a3d3645030911be83a115bfe9e5c
  Author: Congzhe Cao <congzhe.cao at huawei.com>
  Date:   2021-05-11 (Tue, 11 May 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
    M llvm/test/Transforms/LoopInterchange/lcssa.ll

  Log Message:
  -----------
  [LoopInterchange] Handle lcssa PHIs with multiple predecessors

This is a bugfix in the transformation phase.

If the original outer loop header branches to both the inner loop
(header) and the outer loop latch, and if there is an lcssa PHI
node outside the loop nest, then after interchange the new outer latch
will have an lcssa PHI node inserted which has two predecessors, i.e.,
the original outer header and the original outer latch. Currently
the transformation assumes it has only one predecessor (the original
outer latch) and crashes, since the inserted lcssa PHI node does
not take both predecessors as incoming BBs.

Reviewed By: Whitney

Differential Revision: https://reviews.llvm.org/D100792




More information about the All-commits mailing list