[llvm] [ConstantRange] Improve `shlWithNoWrap` (PR #101800)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 3 09:43:33 PDT 2024
================
@@ -1624,12 +1624,43 @@ ConstantRange ConstantRange::shlWithNoWrap(const ConstantRange &Other,
return getEmpty();
ConstantRange Result = shl(Other);
+ if (!NoWrapKind)
+ return Result;
- if (NoWrapKind & OverflowingBinaryOperator::NoSignedWrap)
- Result = Result.intersectWith(sshl_sat(Other), RangeType);
+ KnownBits Known = toKnownBits();
----------------
nikic wrote:
Can move this into the signed case now.
https://github.com/llvm/llvm-project/pull/101800
More information about the llvm-commits
mailing list