[PATCH] D20439: [SelectionDAG] rename/move isKnownToBeAPowerOfTwo() from TargetLowering
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 08:47:50 PDT 2016
spatel created this revision.
spatel added reviewers: kbsmith1, hfinkel, qcolombet.
spatel added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.
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.
http://reviews.llvm.org/D20439
Files:
include/llvm/CodeGen/SelectionDAG.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20439.57803.patch
Type: text/x-patch
Size: 4407 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160519/c4e04111/attachment.bin>
More information about the llvm-commits
mailing list