[PATCH] D59475: [ConstantRange] Add fromKnownBits() method
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 17 11:30:40 PDT 2019
nikic created this revision.
nikic added reviewers: lebedev.ri, spatel.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Following the suggestion in D59450 <https://reviews.llvm.org/D59450>, I'm moving the code for constructing a ConstantRange from KnownBits out of ValueTracking, which also allows us to add a couple of unit tests...
I'm adding this method to ConstantRange rather than KnownBits (which would have been a bit nicer) to avoid creating a dependency from Support to IR, where ConstantRange lives.
PS: C++14 binary literals would be great for these kinds of tests...
Repository:
rL LLVM
https://reviews.llvm.org/D59475
Files:
llvm/include/llvm/IR/ConstantRange.h
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/IR/ConstantRange.cpp
llvm/unittests/IR/ConstantRangeTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59475.191029.patch
Type: text/x-patch
Size: 6110 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190317/86a6e6e7/attachment.bin>
More information about the llvm-commits
mailing list