[all-commits] [llvm/llvm-project] d1aa07: [LoopFlatten] Fix assertion failure

RosieSumpter via All-commits all-commits at lists.llvm.org
Thu Aug 19 05:20:42 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d1aa075129a94232bce6d47306f8c719ceef9142
      https://github.com/llvm/llvm-project/commit/d1aa075129a94232bce6d47306f8c719ceef9142
  Author: Rosie Sumpter <rosie.sumpter at arm.com>
  Date:   2021-08-19 (Thu, 19 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopFlatten.cpp
    M llvm/test/Transforms/LoopFlatten/loop-flatten-negative.ll

  Log Message:
  -----------
  [LoopFlatten] Fix assertion failure

There is an assertion failure in computeOverflowForUnsignedMul
(used in checkOverflow) due to the inner and outer trip counts
having different types. This occurs when the IV has been widened,
but the loop components are not successfully rediscovered.
This is fixed by some refactoring of the code in findLoopComponents
which identifies the trip count of the loop.

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




More information about the All-commits mailing list