reimplement truncate() to make it optimal.
authorNuno Lopes <nunoplopes@sapo.pt>
Thu, 19 Jul 2012 16:27:45 +0000 (16:27 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Thu, 19 Jul 2012 16:27:45 +0000 (16:27 +0000)
commit55c9ecba47953aa8a4a1baffef81461aee660e9a
tree84dac011aff6bd92cc7505ba5e00b85817edeef5
parent4cdd17ef47e71f34f9fc50caf78c51b9c7105ed1
reimplement truncate() to make it optimal.
It is optimal at least up to 7 bits (I've tested all such cases)
This change to truncate() allows a little simplification to the multiplication code,
and it also makes multiplication optimal :)

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