Add a new isSignWrappedSet() method to ConstantRange.
authorNick Lewycky <nicholas@mxc.ca>
Mon, 6 Sep 2010 23:52:49 +0000 (23:52 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Mon, 6 Sep 2010 23:52:49 +0000 (23:52 +0000)
commit32cda119ef63ae1f1ee4b60e1d9e4a5ea8e00604
tree092226f89f03ed3f6063bdd508313f56831f403d
parentc5cebeb3cb44a3fd0aaee956431159757ee47914
Add a new isSignWrappedSet() method to ConstantRange.

Fix zeroExtend and signExtend to support empty sets, and to return the smallest
possible result set which contains the extension of each element in their
inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10)
which contains 63446 members.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113187 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/ConstantRange.h
lib/Support/ConstantRange.cpp
unittests/Support/ConstantRangeTest.cpp