Skip to content
Snippets Groups Projects
Commit 1474f161 authored by Chris Lattner's avatar Chris Lattner
Browse files

Add some new methods for computing sign bit information.

llvm-svn: 28144
parent 21cd9902
No related branches found
No related tags found
No related merge requests found
......@@ -389,6 +389,19 @@ public:
uint64_t &KnownOne,
unsigned Depth = 0) const;
/// ComputeNumSignBits - Return the number of times the sign bit of the
/// register is replicated into the other bits. We know that at least 1 bit
/// is always equal to the sign bit (itself), but other cases can give us
/// information. For example, immediately after an "SRA X, 2", we know that
/// the top 3 bits are all equal to each other, so we return 3.
unsigned ComputeNumSignBits(SDOperand Op, unsigned Depth = 0) const;
/// ComputeNumSignBitsForTargetNode - This method can be implemented by
/// targets that want to expose additional information about sign bits to the
/// DAG Combiner.
virtual unsigned ComputeNumSignBitsForTargetNode(SDOperand Op,
unsigned Depth = 0) const;
struct DAGCombinerInfo {
void *DC; // The DAG Combiner object.
bool BeforeLegalize;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment