[all-commits] [llvm/llvm-project] db284d: [Analysis] use forward DFS in `isEphemeralValueOf`...

Iris Shi via All-commits all-commits at lists.llvm.org
Thu May 7 08:50:54 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: db284dfe4ff0edfc9335a1f631f47c5428d34936
      https://github.com/llvm/llvm-project/commit/db284dfe4ff0edfc9335a1f631f47c5428d34936
  Author: Iris Shi <0.0 at owo.li>
  Date:   2026-05-07 (Thu, 07 May 2026)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/InstSimplify/ctpop-pow2.ll

  Log Message:
  -----------
  [Analysis] use forward DFS in `isEphemeralValueOf` (#196232)

Resolves #128152.

The old algorithm runs a backward DFS from `I` and marks `E` as
ephemeral iff every user of `E` has already been visited. This fails
when `E` has a user that the backward walk never reaches. Switch to a
forward DFS from `E` so that ephemeral values are identified when the
condition has other uses off the assume chain.



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