[all-commits] [llvm/llvm-project] 4988b3: [ValueTracking] Extend computeConstantRange for ad...

Guy David via All-commits all-commits at lists.llvm.org
Wed May 6 15:11:46 PDT 2026


  Branch: refs/heads/users/guy-david/value-tracking-constant-range
  Home:   https://github.com/llvm/llvm-project
  Commit: 4988b3a03a54f88a2dec1d89643b3165d0c574d3
      https://github.com/llvm/llvm-project/commit/4988b3a03a54f88a2dec1d89643b3165d0c574d3
  Author: Guy David <guyda96 at gmail.com>
  Date:   2026-05-07 (Thu, 07 May 2026)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/CodeGen/AMDGPU/sdiv64.ll
    M llvm/test/CodeGen/AMDGPU/srem64.ll
    M llvm/test/CodeGen/AMDGPU/udiv64.ll
    M llvm/test/CodeGen/AMDGPU/urem64.ll
    M llvm/test/Transforms/InstCombine/add.ll
    M llvm/test/Transforms/InstCombine/divceil.ll
    M llvm/test/Transforms/InstCombine/icmp-add.ll
    M llvm/test/Transforms/InstCombine/sadd_sat.ll
    M llvm/test/Transforms/LoopVectorize/epilog-vectorization-reductions.ll
    M llvm/test/Transforms/PhaseOrdering/X86/scalarization-inseltpoison.ll
    M llvm/test/Transforms/PhaseOrdering/X86/scalarization.ll

  Log Message:
  -----------
  [ValueTracking] Extend computeConstantRange for add/sub, sext/zext/trunc

Recursively compute operand ranges for add/sub and propagate ranges
through sext/zext/trunc.
For add/sub, the computed range is intersected with any existing range
from setLimitsForBinOp, and NSW/NUW flags are used via
addWithNoWrap/subWithNoWrap to tighten bounds.

The motivation is to enable further folding of reduce.add expressions
in comparisons, where the result range can be bounded by the input
element ranges.



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