[llvm] [ConstantRange][LVI] Add initial support for `multiplyWithNoWrap` (PR #92356)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 00:16:15 PDT 2024
================
@@ -1167,6 +1169,28 @@ ConstantRange::multiply(const ConstantRange &Other) const {
return UR.isSizeStrictlySmallerThan(SR) ? UR : SR;
}
+ConstantRange
+ConstantRange::multiplyWithNoWrap(const ConstantRange &Other,
+ unsigned NoWrapKind,
+ PreferredRangeType RangeType) const {
+ if (isEmptySet() || Other.isEmptySet())
+ return getEmpty();
+
----------------
dtcxzyw wrote:
It would be better to early exit when both ranges are full.
https://github.com/llvm/llvm-project/pull/92356
More information about the llvm-commits
mailing list