[APInt] Don't call getActiveBits() in ult/ugt(uint64_t) if its a single word.
authorCraig Topper <craig.topper@gmail.com>
Wed, 19 Apr 2017 23:55:48 +0000 (23:55 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 19 Apr 2017 23:55:48 +0000 (23:55 +0000)
commit0e7f6fb6b418952e558b8b56ebd8655b133919ec
tree1db3b6f2b1747704455364b18d7d403fa2c1c695
parent25e71d87b5d2b72acded047f839fed0a406ed73e
[APInt] Don't call getActiveBits() in ult/ugt(uint64_t) if its a single word.

The compiled code already needs to check single/multi word for the countLeadingZeros call inside of getActiveBits, but it isn't able to optimize out the leadingZeros call in the single word case that can't produce a value larger than 64.

This shrank the opt binary by about 5-6k on my local x86-64 build.

llvm-svn: 300798
llvm/include/llvm/ADT/APInt.h