[llvm] [ValueTracking] Refine known bits for linear interpolation patterns (PR #166378)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 5 05:03:59 PST 2025
================
@@ -369,6 +503,15 @@ static void computeKnownBitsAddSub(bool Add, const Value *Op0, const Value *Op1,
isImpliedByDomCondition(ICmpInst::ICMP_SLE, Op1, Op0, Q.CxtI, Q.DL)
.value_or(false))
KnownOut.makeNonNegative();
+
+ if (Add) {
+ // Try to match lerp pattern and combine results
+ const KnownBits LerpKnown =
+ computeKnownBitsFromLerpPattern(Op0, Op1, DemandedElts, Q, Depth);
----------------
dtcxzyw wrote:
Pass `KnownOut` into the function and modify the result in the function.
https://github.com/llvm/llvm-project/pull/166378
More information about the llvm-commits
mailing list