[llvm] [ValueTracking] Support dominating known bits condition in and/or (PR #74728)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 05:02:11 PST 2024


================
@@ -705,28 +705,40 @@ static void computeKnownBitsFromCmp(const Value *V, CmpInst::Predicate Pred,
   }
 }
 
+static void computeKnownBitsFromCond(const Value *V, Value *Cond,
----------------
nikic wrote:

We could do something like https://github.com/llvm/llvm-project/commit/07f0dde1783a0ce7ea17bcf29438989e9077b310 to allow reuse of the full logic for other ValueTracking helpers, e.g. https://github.com/llvm/llvm-project/pull/80941. Seems to add a little overhead, but not much: http://llvm-compile-time-tracker.com/compare.php?from=9ac82f0d3ecf6c13669b0c7940920460c037a292&to=07f0dde1783a0ce7ea17bcf29438989e9077b310&stat=instructions:u

https://github.com/llvm/llvm-project/pull/74728


More information about the llvm-commits mailing list