[PATCH] D25685: [DAG] use isConstOrConstSplat in ComputeNumSignBits to optimize SRA
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 17 10:15:18 PDT 2016
spatel added a comment.
More consolidation is possible with the ISD namespace helpers, or should the previously listed functions go here too?
namespace ISD {
/// Node predicates
/// If N is a BUILD_VECTOR node whose elements are all the same constant or
/// undefined, return true and return the constant value in \p SplatValue.
bool isConstantSplatVector(const SDNode *N, APInt &SplatValue);
/// Return true if the specified node is a BUILD_VECTOR where all of the
/// elements are ~0 or undef.
bool isBuildVectorAllOnes(const SDNode *N);
/// Return true if the specified node is a BUILD_VECTOR where all of the
/// elements are 0 or undef.
bool isBuildVectorAllZeros(const SDNode *N);
/// Return true if the specified node is a BUILD_VECTOR node of all
/// ConstantSDNode or undef.
bool isBuildVectorOfConstantSDNodes(const SDNode *N);
/// Return true if the specified node is a BUILD_VECTOR node of all
/// ConstantFPSDNode or undef.
bool isBuildVectorOfConstantFPSDNodes(const SDNode *N);
/// Return true if the node has at least one operand and all operands of the
/// specified node are ISD::UNDEF.
bool allOperandsUndef(const SDNode *N);
} // end llvm:ISD namespace
https://reviews.llvm.org/D25685
More information about the llvm-commits
mailing list