[all-commits] [llvm/llvm-project] 81e2e4: [SCEV] Set BTC to zero, if constant max BTC < BECo...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Sep 25 02:17:37 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 81e2e4474b3eb6a06e4269b97c7d33c561a3f14f
      https://github.com/llvm/llvm-project/commit/81e2e4474b3eb6a06e4269b97c7d33c561a3f14f
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/trip-count13.ll

  Log Message:
  -----------
  [SCEV] Set BTC to zero, if constant max BTC < BECountIfTaken. (#226098)

If ConstantMaxBECount < BECountIfTaken, we know that the backedge is
never taken and BTC is zero.

No changes in
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1426.
The main motivation is to remove another difference between
howManyLessThans
and howManyGreaterThans, which does not have the BECountIfBackedgeTaken
logic and would compute tighter bounds for backedges never taken.

No compile-time impact:
https://llvm-compile-time-tracker.com/compare.php?from=022fdfa1e5a0b85dc785d30b17be3880768b22dc&to=475eeff40ba520620a406a3f615d660ed7c3eec0&stat=instructions:u

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



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