[APInt] Add an isSplat helper and use it in some places.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 25 Mar 2015 16:49:59 +0000 (16:49 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 25 Mar 2015 16:49:59 +0000 (16:49 +0000)
commiteaf3cbd89760215e1e9bc6979eef68ba53320905
treefa2523e242361758437cae8ad12aebd9043b74e5
parent17a29a48474b5848b6e306bebc8068e3268fdfa2
[APInt] Add an isSplat helper and use it in some places.

To complement getSplat. This is more general than the binary
decomposition method as it also handles non-pow2 splat sizes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233195 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/APInt.h
lib/Analysis/ValueTracking.cpp
lib/Support/APInt.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
unittests/ADT/APIntTest.cpp