[all-commits] [llvm/llvm-project] 4c1f74: [LoopFlatten] Fix invalid assertion (PR49571)

Ta-Wei Tu via All-commits all-commits at lists.llvm.org
Wed Mar 24 03:08:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c1f74a76ce8c0e4ee2f04faacd561be7a76cba8
      https://github.com/llvm/llvm-project/commit/4c1f74a76ce8c0e4ee2f04faacd561be7a76cba8
  Author: Ta-Wei Tu <tu.da.wei at gmail.com>
  Date:   2021-03-24 (Wed, 24 Mar 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopFlatten.cpp
    A llvm/test/Transforms/LoopFlatten/pr49571.ll

  Log Message:
  -----------
  [LoopFlatten] Fix invalid assertion (PR49571)

The `InductionPHI` is not necessarily the increment instruction, as
demonstrated in pr49571.ll.
This patch removes the assertion and instead bails out from the
`LoopFlatten` pass if that happens.

This fixes https://bugs.llvm.org/show_bug.cgi?id=49571

Reviewed By: SjoerdMeijer

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




More information about the All-commits mailing list