[all-commits] [llvm/llvm-project] daa901: [ValueTracking] Extend computeConstantRange for ad...
Guy David via All-commits
all-commits at lists.llvm.org
Thu Feb 12 01:39:31 PST 2026
Branch: refs/heads/users/guy-david/value-tracking-constant-range
Home: https://github.com/llvm/llvm-project
Commit: daa90174454d1dd3b73e4a4d599f300fd19f2689
https://github.com/llvm/llvm-project/commit/daa90174454d1dd3b73e4a4d599f300fd19f2689
Author: Guy David <guyda96 at gmail.com>
Date: 2026-02-12 (Thu, 12 Feb 2026)
Changed paths:
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/test/Analysis/BasicAA/range.ll
M llvm/unittests/Analysis/ValueTrackingTest.cpp
Log Message:
-----------
[ValueTracking] Extend computeConstantRange for add/sub and 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.
Compile-time impact on llvm-test-suite is <0.1% mean.
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