ΒΆunsigned int getICmpCode(
const llvm::ICmpInst* ICI,
bool InvertPred = false)
unsigned int getICmpCode(
const llvm::ICmpInst* ICI,
bool InvertPred = false)
Description
Encode a icmp predicate into a three bit mask. These bits are carefully arranged to allow folding of expressions such as: (A < B) | (A > B) --> (A != B) Note that this is only valid if the first and second predicates have the same sign. It is illegal to do: (A u < B) | (A s> B) Three bits are used to represent the condition, as follows: 0 A > B 1 A == B 2 A < B < => Value Definition 000 0 Always false 001 1 A > B 010 2 A == B 011 3 A >= B 100 4 A < B 101 5 A != B 110 6 A < = B 111 7 Always true
Declared at: llvm/include/llvm/Analysis/CmpInstAnalysis.h:46
Parameters
- const llvm::ICmpInst* ICI
- bool InvertPred = false