[llvm] [KnownBits] Add reduceUMin/reduceUMax support (PR #211310)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 23 06:30:45 PDT 2026
================
@@ -873,6 +873,50 @@ KnownBits KnownBits::reduceAdd(unsigned NumElts) const {
return Result;
}
+KnownBits KnownBits::reduceUMin(unsigned NumElts) const {
+ if (NumElts == 0)
+ return KnownBits(getBitWidth());
+
+ unsigned BitWidth = getBitWidth();
+ KnownBits Result(BitWidth);
+
+ if (isConstant())
+ // If all elements are the same constant, the result is that constant.
----------------
RKSimon wrote:
(style) move the comment above the if() (or add braces)
https://github.com/llvm/llvm-project/pull/211310
More information about the llvm-commits
mailing list