LLVM 20.0.0git
Classes | Namespaces | Functions
CmpInstAnalysis.h File Reference
#include "llvm/ADT/APInt.h"
#include "llvm/IR/InstrTypes.h"

Go to the source code of this file.

Classes

struct  llvm::DecomposedBitTest
 Represents the operation icmp (X & Mask) pred C, where pred can only be eq or ne. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

unsigned llvm::getICmpCode (CmpInst::Predicate Pred)
 Encode a icmp predicate into a three bit mask.
 
Constantllvm::getPredForICmpCode (unsigned Code, bool Sign, Type *OpTy, CmpInst::Predicate &Pred)
 This is the complement of getICmpCode.
 
bool llvm::predicatesFoldable (CmpInst::Predicate P1, CmpInst::Predicate P2)
 Return true if both predicates match sign or if at least one of them is an equality comparison (which is signless).
 
unsigned llvm::getFCmpCode (CmpInst::Predicate CC)
 Similar to getICmpCode but for FCmpInst.
 
Constantllvm::getPredForFCmpCode (unsigned Code, Type *OpTy, CmpInst::Predicate &Pred)
 This is the complement of getFCmpCode.
 
std::optional< DecomposedBitTestllvm::decomposeBitTestICmp (Value *LHS, Value *RHS, CmpInst::Predicate Pred, bool LookThroughTrunc=true, bool AllowNonZeroC=false)
 Decompose an icmp into the form ((X & Mask) pred C) if possible.