OSDN Git Service

[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)
commit25d6dbfc6a4e19200410269614813921ff9445af
tree2f333e8d500cc389c583196cf895314d81bb9bef
parentef5181372f97b36850a0780fa053384b7e35bb49
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300798 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/APInt.h