[all-commits] [llvm/llvm-project] e5ff70: [LoopPeel] Use loop guards when checking if last i...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Jun 10 00:30:04 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e5ff7055beb116f103f030d992fadea49c994511
      https://github.com/llvm/llvm-project/commit/e5ff7055beb116f103f030d992fadea49c994511
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-06-10 (Tue, 10 Jun 2025)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopPeel.cpp
    M llvm/test/Transforms/LoopUnroll/peel-last-iteration-with-guards.ll

  Log Message:
  -----------
  [LoopPeel] Use loop guards when checking if last iter can be peeled. (#142605)

Apply loop guards to BTC before checking if the last iteration should be
peeled off. This also adds an assert to make sure applying the guards
does not pessimize the results. I checked on a large test set and it did
not trigger there, but it adds an additional guard to catch potential
cases where loop-guards pessimize results.

Peels ~15% more loops.

PR: https://github.com/llvm/llvm-project/pull/142605



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list