[all-commits] [llvm/llvm-project] bc173f: [SimpleLoopUnswitch] Fix overflowing frequencies case

Max Kazantsev via All-commits all-commits at lists.llvm.org
Wed Feb 15 02:41:37 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bc173f526c5755d20e584301012b29cc3484b525
      https://github.com/llvm/llvm-project/commit/bc173f526c5755d20e584301012b29cc3484b525
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2023-02-15 (Wed, 15 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
    M llvm/test/Transforms/SimpleLoopUnswitch/inject-invariant-conditions.ll

  Log Message:
  -----------
  [SimpleLoopUnswitch] Fix overflowing frequencies case

When branch is so hot that sum of its frequencies overflows, we have an assertion
failure when trying to construct BranchProbability. Such cases are not interesting
as candidate for unswitching anyways (their branches are too hot), so reject them.




More information about the All-commits mailing list