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)
commit936db8fa2f20a99596c16e209df37f1c29041844
tree183c72d42afd75fd436a82d82c2073641011f317
parentf54827f1b8488111bd40bb9124c0f484624944fa
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

llvm-svn: 260447
llvm/lib/Support/APInt.cpp