[all-commits] [llvm/llvm-project] 323514: [LoopUnroll] Avoid branch on poison for runtime un...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed May 18 00:52:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 323514de58aba8c073faa37335345338ae57173c
      https://github.com/llvm/llvm-project/commit/323514de58aba8c073faa37335345338ae57173c
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-05-18 (Wed, 18 May 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
    M llvm/test/Transforms/LoopUnroll/runtime-loop-at-most-two-exits.ll
    M llvm/test/Transforms/LoopUnroll/runtime-loop-multiexit-dom-verify.ll
    M llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
    M llvm/test/Transforms/LoopUnroll/runtime-multiexit-heuristic.ll

  Log Message:
  -----------
  [LoopUnroll] Avoid branch on poison for runtime unroll with multiple exits

When performing runtime unrolling with multiple exits, one of the
earlier (non-latch) exits may exit the loop on the first iteration,
such that we never branch on the latch exit condition. As such, we
need to freeze the condition of the new branch that is introduced
before the loop, as it now executes unconditionally.

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




More information about the All-commits mailing list