In D19087, we found that the logical equivalent of isKnownToBeAPowerOfTwo() was hiding in TargetLowering as a static function named valueHasExactlyOneBitSet().
This is a no-functional-change-intended patch to rename/move that function over to SelectionDAG near its related analysis functions.
There are at least 2 places (DAGCombiner, X86ISelLowering) where this could be used instead of ad-hoc and watered down code that is trying to match a power-of-2 pattern.