[PATCH] D48399: [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion.
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 21 22:01:46 PDT 2018
sanjoy requested changes to this revision.
sanjoy added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/IR/ConstantRange.cpp:270
+ BitWidth](APInt V) -> ConstantRange {
+ const auto DivRoundDown = [Unsigned](APInt A, APInt B) -> APInt {
+ if (Unsigned)
----------------
Sorry for being difficult, but these should live on `APInt` and be individually unit-tested.
================
Comment at: llvm/lib/IR/ConstantRange.cpp:336
+ };
+ return SubsetIntersect(
+ makeSingleValueRegion(Unsigned ? Other.getUnsignedMin()
----------------
Can you please given an informal description of how this works? For example, naively I'd think for unsigned overflow just checking `[0,Other.getUnsignedMax())` would be sufficient.
https://reviews.llvm.org/D48399
More information about the llvm-commits
mailing list