LLVM 22.0.0git
llvm::InstCombiner Class Referenceabstract

The core instruction combiner logic. More...

#include "llvm/Transforms/InstCombine/InstCombiner.h"

Inheritance diagram for llvm::InstCombiner:
[legend]

Public Types

using BuilderTy = IRBuilder<TargetFolder, IRBuilderCallbackInserter>
 An IRBuilder that automatically inserts new instructions into the worklist.

Public Member Functions

 InstCombiner (InstructionWorklist &Worklist, BuilderTy &Builder, bool MinimizeSize, AAResults *AA, AssumptionCache &AC, TargetLibraryInfo &TLI, TargetTransformInfo &TTI, DominatorTree &DT, OptimizationRemarkEmitter &ORE, BlockFrequencyInfo *BFI, BranchProbabilityInfo *BPI, ProfileSummaryInfo *PSI, const DataLayout &DL, ReversePostOrderTraversal< BasicBlock * > &RPOT)
virtual ~InstCombiner ()=default
ValuegetFreelyInvertedImpl (Value *V, bool WillInvertAllUses, BuilderTy *Builder, bool &DoesConsume, unsigned Depth)
 Return nonnull value if V is free to invert under the condition of WillInvertAllUses.
ValuegetFreelyInverted (Value *V, bool WillInvertAllUses, BuilderTy *Builder, bool &DoesConsume)
ValuegetFreelyInverted (Value *V, bool WillInvertAllUses, BuilderTy *Builder)
bool isFreeToInvert (Value *V, bool WillInvertAllUses, bool &DoesConsume)
 Return true if the specified value is free to invert (apply ~ to).
bool isFreeToInvert (Value *V, bool WillInvertAllUses)
bool canFreelyInvertAllUsersOf (Instruction *V, Value *IgnoredUser)
 Given i1 V, can every user of V be freely adapted if V is changed to !V ?
void addToWorklist (Instruction *I)
AssumptionCachegetAssumptionCache () const
TargetLibraryInfogetTargetLibraryInfo () const
DominatorTreegetDominatorTree () const
const DataLayoutgetDataLayout () const
const SimplifyQuerygetSimplifyQuery () const
OptimizationRemarkEmittergetOptimizationRemarkEmitter () const
BlockFrequencyInfogetBlockFrequencyInfo () const
ProfileSummaryInfogetProfileSummaryInfo () const
std::optional< Instruction * > targetInstCombineIntrinsic (IntrinsicInst &II)
std::optional< Value * > targetSimplifyDemandedUseBitsIntrinsic (IntrinsicInst &II, APInt DemandedMask, KnownBits &Known, bool &KnownBitsComputed)
std::optional< Value * > targetSimplifyDemandedVectorEltsIntrinsic (IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3, std::function< void(Instruction *, unsigned, APInt, APInt &)> SimplifyAndSetOp)
void computeBackEdges ()
bool isBackEdge (const BasicBlock *From, const BasicBlock *To)
InstructionInsertNewInstBefore (Instruction *New, BasicBlock::iterator Old)
 Inserts an instruction New before instruction Old.
InstructionInsertNewInstWith (Instruction *New, BasicBlock::iterator Old)
 Same as InsertNewInstBefore, but also sets the debug loc.
InstructionreplaceInstUsesWith (Instruction &I, Value *V)
 A combiner-aware RAUW-like routine.
InstructionreplaceOperand (Instruction &I, unsigned OpNum, Value *V)
 Replace operand of instruction and add old operand to the worklist.
void replaceUse (Use &U, Value *NewValue)
 Replace use and add the previously used value to the worklist.
virtual InstructioneraseInstFromFunction (Instruction &I)=0
 Combiner aware instruction erasure.
void computeKnownBits (const Value *V, KnownBits &Known, const Instruction *CxtI, unsigned Depth=0) const
KnownBits computeKnownBits (const Value *V, const Instruction *CxtI, unsigned Depth=0) const
bool isKnownToBeAPowerOfTwo (const Value *V, bool OrZero=false, const Instruction *CxtI=nullptr, unsigned Depth=0)
bool MaskedValueIsZero (const Value *V, const APInt &Mask, const Instruction *CxtI=nullptr, unsigned Depth=0) const
unsigned ComputeNumSignBits (const Value *Op, const Instruction *CxtI=nullptr, unsigned Depth=0) const
unsigned ComputeMaxSignificantBits (const Value *Op, const Instruction *CxtI=nullptr, unsigned Depth=0) const
OverflowResult computeOverflowForUnsignedMul (const Value *LHS, const Value *RHS, const Instruction *CxtI, bool IsNSW=false) const
OverflowResult computeOverflowForSignedMul (const Value *LHS, const Value *RHS, const Instruction *CxtI) const
OverflowResult computeOverflowForUnsignedAdd (const WithCache< const Value * > &LHS, const WithCache< const Value * > &RHS, const Instruction *CxtI) const
OverflowResult computeOverflowForSignedAdd (const WithCache< const Value * > &LHS, const WithCache< const Value * > &RHS, const Instruction *CxtI) const
OverflowResult computeOverflowForUnsignedSub (const Value *LHS, const Value *RHS, const Instruction *CxtI) const
OverflowResult computeOverflowForSignedSub (const Value *LHS, const Value *RHS, const Instruction *CxtI) const
virtual bool SimplifyDemandedBits (Instruction *I, unsigned OpNo, const APInt &DemandedMask, KnownBits &Known, const SimplifyQuery &Q, unsigned Depth=0)=0
bool SimplifyDemandedBits (Instruction *I, unsigned OpNo, const APInt &DemandedMask, KnownBits &Known)
virtual ValueSimplifyDemandedVectorElts (Value *V, APInt DemandedElts, APInt &UndefElts, unsigned Depth=0, bool AllowMultipleUsers=false)=0
bool isValidAddrSpaceCast (unsigned FromAS, unsigned ToAS) const

Static Public Member Functions

static ValuepeekThroughBitcast (Value *V, bool OneUseOnly=false)
 Return the source operand of a potentially bitcasted value while optionally checking if it has one use.
static unsigned getComplexity (Value *V)
 Assign a complexity or rank value to LLVM Values.
static bool isCanonicalPredicate (CmpPredicate Pred)
 Predicate canonicalization reduces the number of patterns that need to be matched by other transforms.
static ConstantAddOne (Constant *C)
 Add one to a Constant.
static ConstantSubOne (Constant *C)
 Subtract one from a Constant.
static bool shouldAvoidAbsorbingNotIntoSelect (const SelectInst &SI)
static ConstantgetSafeVectorConstantForBinop (BinaryOperator::BinaryOps Opcode, Constant *In, bool IsRHSConstant)
 Some binary operators require special handling to avoid poison and undefined behavior.

Public Attributes

uint64_t MaxArraySizeForCombine = 0
 Maximum size of array considered when transforming.
BuilderTyBuilder

Protected Attributes

InstructionWorklistWorklist
 A worklist of the instructions that need to be simplified.
const bool MinimizeSize
AAResultsAA
AssumptionCacheAC
TargetLibraryInfoTLI
DominatorTreeDT
const DataLayoutDL
SimplifyQuery SQ
OptimizationRemarkEmitterORE
BlockFrequencyInfoBFI
BranchProbabilityInfoBPI
ProfileSummaryInfoPSI
DomConditionCache DC
ReversePostOrderTraversal< BasicBlock * > & RPOT
bool MadeIRChange = false
SmallDenseSet< std::pair< BasicBlock *, BasicBlock * >, 8 > DeadEdges
 Edges that are known to never be taken.
SmallDenseMap< BasicBlock *, SmallVector< BasicBlock * >, 8 > PredOrder
 Order of predecessors to canonicalize phi nodes towards.
SmallDenseSet< std::pair< const BasicBlock *, const BasicBlock * >, 8 > BackEdges
 Backedges, used to avoid pushing instructions across backedges in cases where this may result in infinite combine loops.
bool ComputedBackEdges = false

Detailed Description

The core instruction combiner logic.

This class provides both the logic to recursively visit instructions and combine them.

Definition at line 48 of file InstCombiner.h.

Member Typedef Documentation

◆ BuilderTy

An IRBuilder that automatically inserts new instructions into the worklist.

Definition at line 60 of file InstCombiner.h.

Constructor & Destructor Documentation

◆ InstCombiner()

llvm::InstCombiner::InstCombiner ( InstructionWorklist & Worklist,
BuilderTy & Builder,
bool MinimizeSize,
AAResults * AA,
AssumptionCache & AC,
TargetLibraryInfo & TLI,
TargetTransformInfo & TTI,
DominatorTree & DT,
OptimizationRemarkEmitter & ORE,
BlockFrequencyInfo * BFI,
BranchProbabilityInfo * BPI,
ProfileSummaryInfo * PSI,
const DataLayout & DL,
ReversePostOrderTraversal< BasicBlock * > & RPOT )
inline

Definition at line 101 of file InstCombiner.h.

References AA, AC, BFI, BPI, Builder, DC, DL, DT, MinimizeSize, ORE, PSI, RPOT, SQ, TLI, and Worklist.

Referenced by llvm::InstCombinerImpl::InstCombinerImpl().

◆ ~InstCombiner()

virtual llvm::InstCombiner::~InstCombiner ( )
virtualdefault

Member Function Documentation

◆ AddOne()

Constant * llvm::InstCombiner::AddOne ( Constant * C)
inlinestatic

◆ addToWorklist()

◆ canFreelyInvertAllUsersOf()

bool llvm::InstCombiner::canFreelyInvertAllUsersOf ( Instruction * V,
Value * IgnoredUser )
inline

Given i1 V, can every user of V be freely adapted if V is changed to !V ?

InstCombine's freelyInvertAllUsersOf() must be kept in sync with this fn. NOTE: for Instructions only!

See also: isFreeToInvert()

Definition at line 244 of file InstCombiner.h.

References assert(), llvm::cast(), I, llvm::MIPatternMatch::m_Not(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), shouldAvoidAbsorbingNotIntoSelect(), and llvm::Value::uses().

Referenced by canFreelyInvert(), llvm::InstCombinerImpl::canonicalizeICmpPredicate(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), and llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp().

◆ computeBackEdges()

◆ computeKnownBits() [1/2]

KnownBits llvm::InstCombiner::computeKnownBits ( const Value * V,
const Instruction * CxtI,
unsigned Depth = 0 ) const
inline

Definition at line 438 of file InstCombiner.h.

References llvm::computeKnownBits(), llvm::Depth, and SQ.

◆ computeKnownBits() [2/2]

◆ ComputeMaxSignificantBits()

unsigned llvm::InstCombiner::ComputeMaxSignificantBits ( const Value * Op,
const Instruction * CxtI = nullptr,
unsigned Depth = 0 ) const
inline

◆ ComputeNumSignBits()

unsigned llvm::InstCombiner::ComputeNumSignBits ( const Value * Op,
const Instruction * CxtI = nullptr,
unsigned Depth = 0 ) const
inline

◆ computeOverflowForSignedAdd()

OverflowResult llvm::InstCombiner::computeOverflowForSignedAdd ( const WithCache< const Value * > & LHS,
const WithCache< const Value * > & RHS,
const Instruction * CxtI ) const
inline

Definition at line 491 of file InstCombiner.h.

References llvm::computeOverflowForSignedAdd(), LHS, RHS, and SQ.

Referenced by llvm::InstCombinerImpl::computeOverflow().

◆ computeOverflowForSignedMul()

OverflowResult llvm::InstCombiner::computeOverflowForSignedMul ( const Value * LHS,
const Value * RHS,
const Instruction * CxtI ) const
inline

Definition at line 476 of file InstCombiner.h.

References llvm::computeOverflowForSignedMul(), LHS, RHS, and SQ.

Referenced by llvm::InstCombinerImpl::computeOverflow().

◆ computeOverflowForSignedSub()

OverflowResult llvm::InstCombiner::computeOverflowForSignedSub ( const Value * LHS,
const Value * RHS,
const Instruction * CxtI ) const
inline

Definition at line 505 of file InstCombiner.h.

References llvm::computeOverflowForSignedSub(), LHS, RHS, and SQ.

Referenced by llvm::InstCombinerImpl::computeOverflow().

◆ computeOverflowForUnsignedAdd()

OverflowResult llvm::InstCombiner::computeOverflowForUnsignedAdd ( const WithCache< const Value * > & LHS,
const WithCache< const Value * > & RHS,
const Instruction * CxtI ) const
inline

Definition at line 483 of file InstCombiner.h.

References llvm::computeOverflowForUnsignedAdd(), LHS, RHS, and SQ.

Referenced by llvm::InstCombinerImpl::computeOverflow().

◆ computeOverflowForUnsignedMul()

OverflowResult llvm::InstCombiner::computeOverflowForUnsignedMul ( const Value * LHS,
const Value * RHS,
const Instruction * CxtI,
bool IsNSW = false ) const
inline

Definition at line 468 of file InstCombiner.h.

References llvm::computeOverflowForUnsignedMul(), LHS, RHS, and SQ.

Referenced by llvm::InstCombinerImpl::computeOverflow().

◆ computeOverflowForUnsignedSub()

OverflowResult llvm::InstCombiner::computeOverflowForUnsignedSub ( const Value * LHS,
const Value * RHS,
const Instruction * CxtI ) const
inline

Definition at line 498 of file InstCombiner.h.

References llvm::computeOverflowForUnsignedSub(), LHS, RHS, and SQ.

Referenced by llvm::InstCombinerImpl::computeOverflow().

◆ eraseInstFromFunction()

virtual Instruction * llvm::InstCombiner::eraseInstFromFunction ( Instruction & I)
pure virtual

Combiner aware instruction erasure.

When dealing with an instruction that has side effects or produces a void value, we can't rely on DCE to delete the instruction. Instead, visit methods should return the value returned by this function.

Implemented in llvm::InstCombinerImpl.

References I.

Referenced by instCombineDMB(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineST1ScatterIndex(), instCombineSVEST1(), modifyIntrinsicCall(), simplifyAMDGCNImageIntrinsic(), simplifySVEIntrinsic(), and simplifyX86MaskedStore().

◆ getAssumptionCache()

AssumptionCache & llvm::InstCombiner::getAssumptionCache ( ) const
inline

◆ getBlockFrequencyInfo()

BlockFrequencyInfo * llvm::InstCombiner::getBlockFrequencyInfo ( ) const
inline

Definition at line 342 of file InstCombiner.h.

References BFI.

◆ getComplexity()

unsigned llvm::InstCombiner::getComplexity ( Value * V)
inlinestatic

Assign a complexity or rank value to LLVM Values.

This is used to reduce the amount of pattern matching needed for compares and commutative instructions. For example, if we have: icmp ugt X, Constant or xor (add X, Constant), cast Z

We do not have to consider the commuted variants of these patterns because canonicalization based on complexity guarantees the above ordering.

This routine maps IR values to various complexity ranks: 0 -> undef 1 -> Constants 2 -> Cast and (f)neg/not instructions 3 -> Other instructions and arguments

Definition at line 143 of file InstCombiner.h.

References llvm::isa(), llvm::PatternMatch::m_FNeg(), llvm::MIPatternMatch::m_Neg(), llvm::MIPatternMatch::m_Not(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().

Referenced by llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::visitFCmpInst(), and llvm::InstCombinerImpl::visitICmpInst().

◆ getDataLayout()

◆ getDominatorTree()

◆ getFreelyInverted() [1/2]

Value * llvm::InstCombiner::getFreelyInverted ( Value * V,
bool WillInvertAllUses,
BuilderTy * Builder )
inline

Definition at line 216 of file InstCombiner.h.

References Builder, and getFreelyInverted().

◆ getFreelyInverted() [2/2]

◆ getFreelyInvertedImpl()

◆ getOptimizationRemarkEmitter()

OptimizationRemarkEmitter & llvm::InstCombiner::getOptimizationRemarkEmitter ( ) const
inline

Definition at line 339 of file InstCombiner.h.

References ORE.

◆ getProfileSummaryInfo()

ProfileSummaryInfo * llvm::InstCombiner::getProfileSummaryInfo ( ) const
inline

Definition at line 343 of file InstCombiner.h.

References PSI.

◆ getSafeVectorConstantForBinop()

Constant * llvm::InstCombiner::getSafeVectorConstantForBinop ( BinaryOperator::BinaryOps Opcode,
Constant * In,
bool IsRHSConstant )
inlinestatic

Some binary operators require special handling to avoid poison and undefined behavior.

If a constant vector has undef elements, replace those undefs with identity constants if possible because those are always safe to execute. If no identity constant exists, replace undef with some other safe constant.

Definition at line 280 of file InstCombiner.h.

References assert(), llvm::CallingConv::C, llvm::cast(), llvm::ConstantVector::get(), llvm::ConstantExpr::getBinOpIdentity(), llvm::Constant::getNullValue(), llvm::isa(), and llvm_unreachable.

Referenced by llvm::InstCombinerImpl::foldSelectShuffle(), foldSelectShuffleWith1Binop(), and llvm::InstCombinerImpl::foldVectorBinop().

◆ getSimplifyQuery()

◆ getTargetLibraryInfo()

TargetLibraryInfo & llvm::InstCombiner::getTargetLibraryInfo ( ) const
inline

Definition at line 335 of file InstCombiner.h.

References TLI.

◆ InsertNewInstBefore()

◆ InsertNewInstWith()

◆ isBackEdge()

bool llvm::InstCombiner::isBackEdge ( const BasicBlock * From,
const BasicBlock * To )
inline

Definition at line 358 of file InstCombiner.h.

References BackEdges, computeBackEdges(), and ComputedBackEdges.

Referenced by llvm::InstCombinerImpl::foldOpIntoPhi().

◆ isCanonicalPredicate()

bool llvm::InstCombiner::isCanonicalPredicate ( CmpPredicate Pred)
inlinestatic

Predicate canonicalization reduces the number of patterns that need to be matched by other transforms.

For example, we may swap the operands of a conditional branch or select to create a compare with a canonical (inverted) predicate which is then more likely to be matched with other values.

Definition at line 160 of file InstCombiner.h.

References llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OLE, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_UGE, and llvm::CmpInst::ICMP_ULE.

Referenced by canonicalizeCmpWithConstant(), llvm::InstCombinerImpl::canonicalizeICmpPredicate(), and llvm::InstCombinerImpl::visitBranchInst().

◆ isFreeToInvert() [1/2]

bool llvm::InstCombiner::isFreeToInvert ( Value * V,
bool WillInvertAllUses )
inline

Definition at line 234 of file InstCombiner.h.

References isFreeToInvert().

◆ isFreeToInvert() [2/2]

bool llvm::InstCombiner::isFreeToInvert ( Value * V,
bool WillInvertAllUses,
bool & DoesConsume )
inline

Return true if the specified value is free to invert (apply ~ to).

This happens in cases where the ~ can be eliminated. If WillInvertAllUses is true, work under the assumption that the caller intends to remove all uses of V and only keep uses of ~V.

See also: canFreelyInvertAllUsersOf()

Definition at line 228 of file InstCombiner.h.

References getFreelyInverted().

Referenced by canFreelyInvert(), isFreeToInvert(), matchDeMorgansLaws(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitICmpInst(), and llvm::InstCombinerImpl::visitSub().

◆ isKnownToBeAPowerOfTwo()

◆ isValidAddrSpaceCast()

bool InstCombiner::isValidAddrSpaceCast ( unsigned FromAS,
unsigned ToAS ) const

Definition at line 193 of file InstructionCombining.cpp.

Referenced by SimplifyDemandedVectorElts().

◆ MaskedValueIsZero()

◆ peekThroughBitcast()

Value * llvm::InstCombiner::peekThroughBitcast ( Value * V,
bool OneUseOnly = false )
inlinestatic

Return the source operand of a potentially bitcasted value while optionally checking if it has one use.

If there is no bitcast or the one use check is not met, return the input value itself.

Definition at line 119 of file InstCombiner.h.

References llvm::dyn_cast().

Referenced by llvm::X86TTIImpl::instCombineIntrinsic().

◆ replaceInstUsesWith()

Instruction * llvm::InstCombiner::replaceInstUsesWith ( Instruction & I,
Value * V )
inline

A combiner-aware RAUW-like routine.

This method is to be used when an instruction is found to be dead, replaceable with another preexisting expression. Here we add all uses of I to the worklist, replace all uses of I with the new value, then return I, so that the inst combiner will know that I was modified.

Definition at line 388 of file InstCombiner.h.

References llvm::dbgs(), llvm::PoisonValue::get(), I, llvm::isa(), LLVM_DEBUG, and Worklist.

Referenced by combineConstantOffsets(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonIDivRemTransforms(), llvm::InstCombinerImpl::commonIDivTransforms(), convertFSqrtDivIntoFMul(), convertNvvmIntrinsicToLlvm(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), llvm::InstCombinerImpl::foldAllocaCmp(), llvm::InstCombinerImpl::foldBinopWithRecurrence(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldDeadPhiWeb(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), foldFCmpWithFloorAndCeil(), llvm::InstCombinerImpl::foldFMulReassoc(), foldFPtoI(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpWithConstantViaTruthTable(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldICmpShlConstConst(), llvm::InstCombinerImpl::foldICmpShrConstConst(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithConstant(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), llvm::InstCombinerImpl::foldICmpWithMinMax(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldItoFPtoI(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldPowiReassoc(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::foldSelectShuffle(), foldSelectZeroOrFixedOp(), llvm::InstCombinerImpl::FoldShiftByConstant(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), llvm::InstCombinerImpl::freelyInvertAllUsersOf(), handleSpaceCheckIntrinsics(), llvm::InstCombinerImpl::handleUnreachableFrom(), instCombineConvertFromSVBool(), instCombineInStreamingMode(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineMaxMinNM(), instCombinePTrue(), instCombineRDFFR(), instCombineSMECntsd(), instCombineSVECmpNE(), instCombineSVECntElts(), instCombineSVECondLast(), instCombineSVEDup(), instCombineSVEDupqLane(), instCombineSVEDupX(), instCombineSVEInsr(), instCombineSVELast(), instCombineSVELD1(), instCombineSVEPTest(), instCombineSVESDIV(), instCombineSVESel(), instCombineSVESrshl(), instCombineSVETBL(), instCombineSVEUnpack(), instCombineSVEUxt(), instCombineSVEUzp1(), instCombineSVEVectorBinOp(), instCombineSVEVectorFuseMulAddSub(), instCombineSVEZip(), instCombineWhilelo(), modifyIntrinsicCall(), processPhiNode(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), llvm::InstCombinerImpl::removeInstructionsBeforeUnreachable(), replaceExtractElements(), rewriteGEPAsOffset(), simplifyAllocaArraySize(), llvm::InstCombinerImpl::SimplifyDemandedInstructionBits(), simplifyIRemMulShl(), simplifySVEIntrinsic(), simplifySVEIntrinsicBinOp(), simplifyX86MaskedLoad(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), tryCombineFromSVBoolBinOp(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), unpackLoadToAggregate(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitAllocSite(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitFree(), llvm::InstCombinerImpl::visitFreeze(), llvm::InstCombinerImpl::visitFRem(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitInsertValueInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

◆ replaceOperand()

Instruction * llvm::InstCombiner::replaceOperand ( Instruction & I,
unsigned OpNum,
Value * V )
inline

Replace operand of instruction and add old operand to the worklist.

Definition at line 412 of file InstCombiner.h.

References I, and Worklist.

Referenced by combineConstantOffsets(), llvm::InstCombinerImpl::commonIDivRemTransforms(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), foldCtpop(), foldCttzCtlz(), foldFabsWithFcmpZero(), foldFCmpFSubIntoFCmp(), llvm::InstCombinerImpl::foldICmpXorConstant(), llvm::InstCombinerImpl::foldPHIArgIntToPtrToPHI(), foldSelectBinOpIdentity(), foldSelectZeroOrFixedOp(), foldShuffleWithInsert(), foldSqrtWithFcmpZero(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), simplifyAllocaArraySize(), simplifyAssocCastAssoc(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), simplifySVEIntrinsic(), simplifySVEIntrinsicBinOp(), simplifyValueKnownNonZero(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitReturnInst(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitStoreInst(), and llvm::InstCombinerImpl::visitSwitchInst().

◆ replaceUse()

◆ shouldAvoidAbsorbingNotIntoSelect()

bool llvm::InstCombiner::shouldAvoidAbsorbingNotIntoSelect ( const SelectInst & SI)
inlinestatic

◆ SimplifyDemandedBits() [1/2]

bool llvm::InstCombiner::SimplifyDemandedBits ( Instruction * I,
unsigned OpNo,
const APInt & DemandedMask,
KnownBits & Known )
inline

Definition at line 516 of file InstCombiner.h.

References I, SimplifyDemandedBits(), and SQ.

◆ SimplifyDemandedBits() [2/2]

virtual bool llvm::InstCombiner::SimplifyDemandedBits ( Instruction * I,
unsigned OpNo,
const APInt & DemandedMask,
KnownBits & Known,
const SimplifyQuery & Q,
unsigned Depth = 0 )
pure virtual

◆ SimplifyDemandedVectorElts()

virtual Value * llvm::InstCombiner::SimplifyDemandedVectorElts ( Value * V,
APInt DemandedElts,
APInt & UndefElts,
unsigned Depth = 0,
bool AllowMultipleUsers = false )
pure virtual

◆ SubOne()

◆ targetInstCombineIntrinsic()

std::optional< Instruction * > InstCombiner::targetInstCombineIntrinsic ( IntrinsicInst & II)

◆ targetSimplifyDemandedUseBitsIntrinsic()

std::optional< Value * > InstCombiner::targetSimplifyDemandedUseBitsIntrinsic ( IntrinsicInst & II,
APInt DemandedMask,
KnownBits & Known,
bool & KnownBitsComputed )

Definition at line 168 of file InstructionCombining.cpp.

References II.

Referenced by llvm::InstCombinerImpl::SimplifyDemandedUseBits().

◆ targetSimplifyDemandedVectorEltsIntrinsic()

std::optional< Value * > InstCombiner::targetSimplifyDemandedVectorEltsIntrinsic ( IntrinsicInst & II,
APInt DemandedElts,
APInt & UndefElts,
APInt & UndefElts2,
APInt & UndefElts3,
std::function< void(Instruction *, unsigned, APInt, APInt &)> SimplifyAndSetOp )

Definition at line 179 of file InstructionCombining.cpp.

References II.

Referenced by llvm::InstCombinerImpl::SimplifyDemandedVectorElts().

Member Data Documentation

◆ AA

◆ AC

◆ BackEdges

SmallDenseSet<std::pair<const BasicBlock *, const BasicBlock *>, 8> llvm::InstCombiner::BackEdges
protected

Backedges, used to avoid pushing instructions across backedges in cases where this may result in infinite combine loops.

For irreducible loops this picks an arbitrary backedge.

Definition at line 97 of file InstCombiner.h.

Referenced by computeBackEdges(), and isBackEdge().

◆ BFI

BlockFrequencyInfo* llvm::InstCombiner::BFI
protected

◆ BPI

◆ Builder

BuilderTy& llvm::InstCombiner::Builder

Definition at line 61 of file InstCombiner.h.

Referenced by canonicalizeBitCastExtElt(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeGEPOfConstGEPI8(), combineConstantOffsets(), llvm::InstCombinerImpl::combineLoadToNewType(), combineStoreToNewValue(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBinOpWithConstantViaTruthTable(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpOrXX(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldICmpWithConstant(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), foldICmpWithLowBitMaskedVal(), llvm::InstCombinerImpl::foldICmpWithTrunc(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), foldIdempotentBinaryIntrinsicRecurrence(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), llvm::InstCombinerImpl::foldIsMultipleOfAPowerOfTwo(), foldLogicCastConstant(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), llvm::InstCombinerImpl::foldPowiReassoc(), llvm::InstCombinerImpl::foldPtrToIntOfGEP(), llvm::InstCombinerImpl::foldReversedIntrinsicOperands(), llvm::InstCombinerImpl::foldSelectICmp(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombinerImpl::FoldShiftByConstant(), llvm::InstCombinerImpl::foldShuffledIntrinsicOperands(), llvm::InstCombinerImpl::foldSquareSumFP(), llvm::InstCombinerImpl::foldSquareSumInt(), llvm::InstCombinerImpl::foldUsingDistributiveLaws(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), foldVecExtTruncToExtElt(), llvm::InstCombinerImpl::foldVectorBinop(), foldVecTruncToExtElt(), freelyInvert(), getFreelyInverted(), getFreelyInverted(), getFreelyInvertedImpl(), getShiftedValue(), llvm::GCNTTIImpl::hoistLaneIntrinsicThroughOperand(), llvm::InstCombinerImpl::insertRangeTest(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), InstCombiner(), instCombineRDFFR(), llvm::InstCombinerImpl::InstCombinerImpl(), instCombineSMECntsd(), instCombineST1ScatterIndex(), instCombineSVECmpNE(), instCombineSVECntElts(), instCombineSVECondLast(), instCombineSVEDupqLane(), instCombineSVEDupX(), instCombineSVELast(), instCombineSVELD1(), instCombineSVEPTest(), instCombineSVESDIV(), instCombineSVESel(), instCombineSVESrshl(), instCombineSVEST1(), instCombineSVETBL(), instCombineSVEUnpack(), instCombineSVEUxt(), instCombineSVEUzp1(), instCombineSVEVectorBinOp(), instCombineSVEVectorFuseMulAddSub(), instCombineWhilelo(), matchDeMorgansLaws(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), modifyIntrinsicCall(), narrowUDivURem(), llvm::Negator::Negate(), optimizeIntegerToVectorInsertions(), llvm::InstCombinerImpl::OptimizePointerDifference(), optimizeVectorResizeWithIntegerBitCasts(), processPhiNode(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), llvm::InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::InstCombinerImpl::run(), llvm::InstCombinerImpl::SimplifyAddWithRemainder(), simplifyAllocaArraySize(), llvm::GCNTTIImpl::simplifyAMDGCNLaneIntrinsicDemanded(), simplifyAMDGCNMemoryIntrinsicDemanded(), simplifyAndOrWithOpReplaced(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), llvm::InstCombinerImpl::simplifyBinOpSplats(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), simplifyInvariantGroupIntrinsic(), llvm::InstCombinerImpl::simplifyRangeCheck(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifySVEIntrinsicBinOp(), simplifyUsingControlFlow(), simplifyValueKnownNonZero(), simplifyX86MaskedLoad(), simplifyX86MaskedStore(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::InstCombinerImpl::takeLog2(), transformToIndexedCompare(), tryCombineFromSVBoolBinOp(), llvm::InstCombinerImpl::tryFactorizationFolds(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAllocSite(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

◆ ComputedBackEdges

bool llvm::InstCombiner::ComputedBackEdges = false
protected

Definition at line 98 of file InstCombiner.h.

Referenced by computeBackEdges(), and isBackEdge().

◆ DC

◆ DeadEdges

SmallDenseSet<std::pair<BasicBlock *, BasicBlock *>, 8> llvm::InstCombiner::DeadEdges
protected

◆ DL

const DataLayout& llvm::InstCombiner::DL
protected

Definition at line 76 of file InstCombiner.h.

Referenced by llvm::InstCombinerImpl::commonCastTransforms(), ComputeMaxSignificantBits(), ComputeNumSignBits(), llvm::InstCombinerImpl::EvaluateInDifferentType(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpBinOpWithConstantViaTruthTable(), llvm::InstCombinerImpl::foldICmpInstWithConstantNotInt(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithCastOp(), llvm::InstCombinerImpl::foldICmpWithConstant(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldPHIArgZextsIntoPHI(), llvm::InstCombinerImpl::foldPtrToIntOfGEP(), llvm::InstCombinerImpl::foldSelectICmp(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombinerImpl::FoldShiftByConstant(), getDataLayout(), InstCombiner(), llvm::InstCombinerImpl::InstCombinerImpl(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), llvm::InstCombinerImpl::OptimizePointerDifference(), llvm::InstCombinerImpl::prepareWorklist(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyDemandedInstructionBits(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitAllocSite(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFree(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitTrunc().

◆ DT

◆ MadeIRChange

◆ MaxArraySizeForCombine

uint64_t llvm::InstCombiner::MaxArraySizeForCombine = 0

Maximum size of array considered when transforming.

Definition at line 56 of file InstCombiner.h.

Referenced by combineInstructionsOverFunction(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), unpackLoadToAggregate(), and unpackStoreToAggregate().

◆ MinimizeSize

const bool llvm::InstCombiner::MinimizeSize
protected

◆ ORE

OptimizationRemarkEmitter& llvm::InstCombiner::ORE
protected

◆ PredOrder

SmallDenseMap<BasicBlock *, SmallVector<BasicBlock *>, 8> llvm::InstCombiner::PredOrder
protected

Order of predecessors to canonicalize phi nodes towards.

Definition at line 92 of file InstCombiner.h.

◆ PSI

ProfileSummaryInfo* llvm::InstCombiner::PSI
protected

◆ RPOT

◆ SQ

SimplifyQuery llvm::InstCombiner::SQ
protected

Definition at line 77 of file InstCombiner.h.

Referenced by llvm::InstCombinerImpl::commonShiftTransforms(), computeKnownBits(), computeKnownBits(), computeOverflowForSignedAdd(), computeOverflowForSignedMul(), computeOverflowForSignedSub(), computeOverflowForUnsignedAdd(), computeOverflowForUnsignedMul(), computeOverflowForUnsignedSub(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithMinMax(), llvm::InstCombinerImpl::foldICmpWithZero(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldSelectICmp(), llvm::InstCombinerImpl::foldSignBitTest(), llvm::InstCombinerImpl::foldUsingDistributiveLaws(), llvm::InstCombinerImpl::foldVectorSelect(), getSimplifyQuery(), InstCombiner(), isKnownToBeAPowerOfTwo(), MaskedValueIsZero(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), SimplifyDemandedBits(), llvm::InstCombinerImpl::SimplifyDemandedInstructionBits(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), llvm::InstCombinerImpl::tryFactorizationFolds(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFreeze(), llvm::InstCombinerImpl::visitFRem(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitInsertValueInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSIToFP(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitUIToFP(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitXor(), llvm::InstCombinerImpl::visitZExt(), and llvm::InstCombinerImpl::~InstCombinerImpl().

◆ TLI

◆ Worklist


The documentation for this class was generated from the following files: