[all-commits] [llvm/llvm-project] 1c0eda: Revert "[SCEV] Speed up forgetLoop by avoiding def...

Mingjie Xu via All-commits all-commits at lists.llvm.org
Thu Aug 6 18:16:10 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1c0eda0d2371a6a755f90299892a7b89dc917442
      https://github.com/llvm/llvm-project/commit/1c0eda0d2371a6a755f90299892a7b89dc917442
  Author: Mingjie Xu <xumingjie.enna1 at bytedance.com>
  Date:   2026-08-07 (Fri, 07 Aug 2026)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/unittests/Analysis/ScalarEvolutionTest.cpp

  Log Message:
  -----------
  Revert "[SCEV] Speed up forgetLoop by avoiding def-use walk for loop-header PHIs" (#212485)

Reverts https://github.com/llvm/llvm-project/pull/201572
Multiple miscompilations are reported, see
https://github.com/llvm/llvm-project/issues/207744,
https://github.com/llvm/llvm-project/issues/212027

That commit made forgetLoop() rely on LoopUsers[L] and stop walking the
def-use chain of the loop-header PHIs. This is insufficient, because
some cached data is derived from the underlying IR of SCEVUnknown, it is
not reachable from LoopUsers[L].
After that commit, forgetLoop() no longer invalidated them, so stale
UnsignedRanges / SignedRanges, ConstantMultipleCache, ValuesAtScopes
cause miscompilations.



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