[llvm] [KnownBits] Add reduceUMin/reduceUMax support (PR #211310)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 23 06:30:46 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);
----------------
RKSimon wrote:
Move the NumElts == 0 case after this and reuse the Result variable:
```
if (NumElts == 0)
return Result;
```
https://github.com/llvm/llvm-project/pull/211310
More information about the llvm-commits
mailing list