[all-commits] [llvm/llvm-project] 432a12: [NFC][LoopUnroll] Update test coverage for peeling...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Wed Nov 6 04:09:24 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 432a12c8037293bd1ff919a82f1d4412772ac534
      https://github.com/llvm/llvm-project/commit/432a12c8037293bd1ff919a82f1d4412772ac534
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M llvm/test/Transforms/LoopUnroll/peel-loop-conditions.ll

  Log Message:
  -----------
  [NFC][LoopUnroll] Update test coverage for peeling w/ inequality predicates


  Commit: 4fe94d033120da2000f1f31f0c54f3d95a159a53
      https://github.com/llvm/llvm-project/commit/4fe94d033120da2000f1f31f0c54f3d95a159a53
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2019-11-06 (Wed, 06 Nov 2019)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp
    M llvm/test/Transforms/LoopUnroll/peel-loop-conditions.ll

  Log Message:
  -----------
  [LoopUnroll] countToEliminateCompares(): fix handling of [in]equality predicates (PR43840)

Summary:
I believe this bisects to https://reviews.llvm.org/D44983
(`[LoopUnroll] Only peel if a predicate becomes known in the loop body.`)

While that revision did contain tests that showed arguably-subpar peeling
for [in]equality predicates that [not] happen in the middle of the loop,
it also disabled peeling for the *first* loop iteration,
because latch would be canonicalized to [in]equality comparison..

That was intentional as per https://reviews.llvm.org/D44983#1059583.
I'm not 100% sure that i'm using correct checks here,
but this fix appears to be going in the right direction..

Let me know if i'm missing some checks here..

Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=43840 | PR43840 ]].

Reviewers: fhahn, mkazantsev, efriedma

Reviewed By: fhahn

Subscribers: xbolva00, hiraditya, zzheng, llvm-commits, fhahn

Tags: #llvm

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


Compare: https://github.com/llvm/llvm-project/compare/13c90a57165b...4fe94d033120


More information about the All-commits mailing list