[ConstantRange] Support for ashr in ConstantRange computation
authorMax Kazantsev <max.kazantsev@azul.com>
Mon, 18 Dec 2017 13:01:32 +0000 (13:01 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Mon, 18 Dec 2017 13:01:32 +0000 (13:01 +0000)
commitd792171efbf155fc741290e87b7d1e54fb1ece29
tree1b4993291e157235c9c5c2b1a40999276df30594
parentf70af977af43380e760f7c722ec089ae10e86208
[ConstantRange] Support for ashr in ConstantRange computation

Extend the ConstantRange implementation to compute the range of possible values resulting from an arithmetic right shift operation.
There will be a follow up patch to leverage this constant range infrastructure in LazyValueInfo.

Patch by Surya Kumari Jangala!

Differential Revision: https://reviews.llvm.org/D40881

llvm-svn: 320976
llvm/include/llvm/IR/ConstantRange.h
llvm/lib/IR/ConstantRange.cpp
llvm/unittests/IR/ConstantRangeTest.cpp