[all-commits] [llvm/llvm-project] 49d040: [SCEV] Fix ValuesAtScopesUsers consistency

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Dec 3 01:03:29 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 49d040ac978c60d48710d327d5d8b1bd0c9ad1fb
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2021-12-03 (Fri, 03 Dec 2021)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    A llvm/test/Analysis/ScalarEvolution/values-at-scopes-consistency.ll

  Log Message:
  [SCEV] Fix ValuesAtScopesUsers consistency

Fixes verification failure reported at:

The issue is that getSCEVAtScope() might compute a result without
inserting it in the ValuesAtScopes map in degenerate cases,
specifically if the ValuesAtScopes entry is invalidated during the
calculation. Arguably we should still insert the result if no
existing placeholder is found, but for now just tweak the logic
to only update ValuesAtScopesUsers if ValuesAtScopes is updated.

More information about the All-commits mailing list