[all-commits] [llvm/llvm-project] 1aa86c: [LoopUnroll] Fix division by zero (#166258)

Joel E. Denny via All-commits all-commits at lists.llvm.org
Tue Nov 4 09:49:55 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1aa86ca521b8fea5ff728945d5ea5cdef97a6250
      https://github.com/llvm/llvm-project/commit/1aa86ca521b8fea5ff728945d5ea5cdef97a6250
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2025-11-04 (Tue, 04 Nov 2025)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
    A llvm/test/Transforms/LoopUnroll/loop-probability-one.ll

  Log Message:
  -----------
  [LoopUnroll] Fix division by zero (#166258)

PR #159163's probability computation for epilogue loops does not handle
the possibility of an original loop probability of one. Runtime loop
unrolling does not make sense for such an infinite loop, and a division
by zero results. This patch works around that case.

Issue #165998.



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