[all-commits] [llvm/llvm-project] 7aed53: [ScalarEvolution] Handle addrec incoming value in ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Feb 10 01:07:44 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7aed53eb1982113e825534f0f66d0a0e46e7a5ed
      https://github.com/llvm/llvm-project/commit/7aed53eb1982113e825534f0f66d0a0e46e7a5ed
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2025-02-10 (Mon, 10 Feb 2025)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Transforms/IndVarSimplify/pr126012.ll

  Log Message:
  -----------
  [ScalarEvolution] Handle addrec incoming value in isImpliedViaMerge() (#126236)

The code already guards against values coming from a previous iteration
using properlyDominates(). However, addrecs are considered to properly
dominate the loop they are defined in.

Handle this special case separately, by checking for expressions that
have computable loop evolution (this should cover cases like a zext of
an addrec as well).

I considered changing the definition of properlyDominates() instead, but
decided against it. The current definition is useful in other context,
e.g. when deciding whether an expression is safe to expand in a given
block.

Fixes https://github.com/llvm/llvm-project/issues/126012.



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