[all-commits] [llvm/llvm-project] f54255: [ConstraintElim] Link values to decompositions dur...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Sep 22 12:06:57 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f542556dfae605899fd31feda9eadef91ac00aa6
      https://github.com/llvm/llvm-project/commit/f542556dfae605899fd31feda9eadef91ac00aa6
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M llvm/lib/Analysis/ConstraintSystem.cpp
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    A llvm/test/Transforms/ConstraintElimination/decompose-at-use.ll

  Log Message:
  -----------
  [ConstraintElim] Link values to decompositions during queries if needed. (#224623)

Decomposition is context sensitive and uses information at the query
point to determine if operations have the required wrap flags.

This can lead to situation where at the time facts are added, we fail to
decompose an operation (like `%y = add %x, 1`), and only add it as
variable `%y`.

If at query time, we can decompose `%y`, the query will contains `%x`
and `1`
as variable/constant, with no connection to the fact added earlier.

This can pessimize results in some cases. To avoid this, add additional
rows connecting the variable and the decomposition (e.g.` %y ==
decompose
(add %x, 1))` and re-try the query.

For now, only check top-level operands. This helps with a few cases in
practice. But is not complete, as this issue could happen at each step
of the
decompose recursion. We can investigate this as follow-up.

There are 2 additional folds in
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1351, a fold
in ClamAV and fixes a regression with
https://github.com/llvm/llvm-project/pull/224621.

Compile-time impact is in the noise

https://llvm-compile-time-tracker.com/compare.php?from=c5c167c7436f035152289cb9489548ccf5328bb3&to=e4be2920133168a85d0cfbf9390b1bc752abcc0f&stat=instructions:u

PR: https://github.com/llvm/llvm-project/pull/224623



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