[all-commits] [llvm/llvm-project] 367df1: [LoopFlatten] Bail if we can't perform flattening ...

sjoerdmeijer via All-commits all-commits at lists.llvm.org
Wed Sep 29 11:54:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 367df18050303b27bc6937e44e4d636332333ae7
      https://github.com/llvm/llvm-project/commit/367df18050303b27bc6937e44e4d636332333ae7
  Author: Sjoerd Meijer <sjoerd.meijer at arm.com>
  Date:   2021-09-29 (Wed, 29 Sep 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopFlatten.cpp
    A llvm/test/Transforms/LoopFlatten/widen-iv3.ll

  Log Message:
  -----------
  [LoopFlatten] Bail if we can't perform flattening after IV widening

It can happen that after widening of the IV, flattening may not be possible,
e.g. when it is deemed unprofitable. We were not properly checking this, which
resulted in flattening being applied when it shouldn't, also leading to
incorrect results (miscompilation).

This should fix PR51980 (https://bugs.llvm.org/show_bug.cgi?id=51980)

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




More information about the All-commits mailing list