OSDN Git Service

APInt: Simplify EqualSlowCase
authorMatthias Braun <matze@braunis.de>
Wed, 10 Feb 2016 22:13:10 +0000 (22:13 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 10 Feb 2016 22:13:10 +0000 (22:13 +0000)
commit6bf8999e3ac14d9e01f4fe4564dde4a668bc4049
treefa4842ffa33b5797fa2a16920341a16fdcc95452
parent7e57e07d4e107f21946d4c56f726e68b644cecb8
APInt: Simplify EqualSlowCase

Previously the code used getActiveBits() to determine the highest set
bit of each APInt first. However doing so requires the same amount of
memory accesses as simply comparing both numbers right away.

Removing all the active bit checks leads to simpler code and is faster
in my benchmark.

Differential Revision: http://reviews.llvm.org/D16620

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