[all-commits] [llvm/llvm-project] 68a9cd: [Polly] Detect preconditions of cached user assump...

Timur Baidusenov via All-commits all-commits at lists.llvm.org
Fri Sep 25 05:06:31 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 68a9cd31fd277f9f6b8a8ab95e18d00a786e7c12
      https://github.com/llvm/llvm-project/commit/68a9cd31fd277f9f6b8a8ab95e18d00a786e7c12
  Author: Timur Baidusenov <timurbaidusenov at gmail.com>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    M polly/lib/Analysis/ScopBuilder.cpp
    A polly/test/ScopInfo/user-assumption-cached-precondition.ll

  Log Message:
  -----------
  [Polly] Detect preconditions of cached user assumption translations (#226204)

`addUserAssumptions` detected preconditions of a user assumption by
checking whether building its condition recorded new assumptions, but
`SCEVAffinator` caches translated expressions, so a precondition shared
with an earlier assumption (e.g. the same truncation) was missed and the
assumption went into the context, removing the runtime check it relied
on. For example, with `__builtin_assume((signed char)n >= 0)` and
`__builtin_assume((signed char)n < 10)`, the `n >= 128` check was
dropped, although `n = 261` satisfies both assumptions. Instead, check
the invalid domain of each assumption, which is also cached, and if it
is non-empty, add the assumption to the defined behavior context as in
#189350.

Assisted-by: Claude (Anthropic)



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