[all-commits] [llvm/llvm-project] eefe77: [ConstraintElim] Add signed no-wrap rule for sub t...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Sep 18 14:32:55 PDT 2026


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

  Changed paths:
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    M llvm/test/Transforms/ConstraintElimination/decompose-signed-preconditions.ll
    M llvm/test/Transforms/ConstraintElimination/induction-exit-condition-or-and.ll
    M llvm/test/Transforms/ConstraintElimination/materialize-flags.ll
    M llvm/test/Transforms/ConstraintElimination/reproducer-remarks.ll

  Log Message:
  -----------
  [ConstraintElim] Add signed no-wrap rule for sub to isKnownNoWrap. (#224621)

Port the existing logic from usub_sat simplification to isKnownNoWrap:
Op0 - Op1 does not wrap signed if Op1 is non-negative and Op0 s>= Op1.

https://alive2.llvm.org/ce/z/HsUyo_

This is in preparation to update simplifications to also use
isKnownNoWrap.

Improves results in a few cases
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1358.

Compile-time impact is in the noise:

https://llvm-compile-time-tracker.com/compare.php?from=0401d338f425ab4d85738d48e9f5432685bf70fb&to=5f9d1cae5fe4222b9ddaf59605e12420df09808e&stat=instructions:u

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



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