#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/IntervalMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/CodeGen/ByteProvider.h"
#include "llvm/CodeGen/DAGCombine.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/RuntimeLibcallUtil.h"
#include "llvm/CodeGen/SDPatternMatch.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGAddressAnalysis.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/CodeGen/SelectionDAGTargetInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/CodeGenTypes/MachineValueType.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Metadata.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/DebugCounter.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <functional>
#include <iterator>
#include <optional>
#include <string>
#include <tuple>
#include <utility>
#include <variant>
#include "MatchContext.h"
usingnamespacellvm;
usingnamespacellvm::SDPatternMatch;
#define DEBUG_TYPE …
STATISTIC(NodesCombined , "Number of dag nodes combined");
STATISTIC(PreIndexedNodes , "Number of pre-indexed nodes created");
STATISTIC(PostIndexedNodes, "Number of post-indexed nodes created");
STATISTIC(OpsNarrowed , "Number of load/op/store narrowed");
STATISTIC(LdStFP2Int , "Number of fp load/store pairs transformed to int");
STATISTIC(SlicedLoads, "Number of load sliced");
STATISTIC(NumFPLogicOpsConv, "Number of logic ops converted to fp ops");
DEBUG_COUNTER(DAGCombineCounter, "dagcombine",
"Controls whether a DAG combine is performed for a node");
static cl::opt<bool>
CombinerGlobalAA("combiner-global-alias-analysis", cl::Hidden,
cl::desc("Enable DAG combiner's use of IR alias analysis"));
static cl::opt<bool>
UseTBAA("combiner-use-tbaa", cl::Hidden, cl::init(true),
cl::desc("Enable DAG combiner's use of TBAA"));
#ifndef NDEBUG
static cl::opt<std::string>
CombinerAAOnlyFunc("combiner-aa-only-func", cl::Hidden,
cl::desc("Only use DAG-combiner alias analysis in this"
" function"));
#endif
static cl::opt<bool>
StressLoadSlicing("combiner-stress-load-slicing", cl::Hidden,
cl::desc("Bypass the profitability model of load slicing"),
cl::init(false));
static cl::opt<bool>
MaySplitLoadIndex("combiner-split-load-index", cl::Hidden, cl::init(true),
cl::desc("DAG combiner may split indexing from loads"));
static cl::opt<bool>
EnableStoreMerging("combiner-store-merging", cl::Hidden, cl::init(true),
cl::desc("DAG combiner enable merging multiple stores "
"into a wider store"));
static cl::opt<unsigned> TokenFactorInlineLimit(
"combiner-tokenfactor-inline-limit", cl::Hidden, cl::init(2048),
cl::desc("Limit the number of operands to inline for Token Factors"));
static cl::opt<unsigned> StoreMergeDependenceLimit(
"combiner-store-merge-dependence-limit", cl::Hidden, cl::init(10),
cl::desc("Limit the number of times for the same StoreNode and RootNode "
"to bail out in store merging dependence check"));
static cl::opt<bool> EnableReduceLoadOpStoreWidth(
"combiner-reduce-load-op-store-width", cl::Hidden, cl::init(true),
cl::desc("DAG combiner enable reducing the width of load/op/store "
"sequence"));
static cl::opt<bool> EnableShrinkLoadReplaceStoreWithStore(
"combiner-shrink-load-replace-store-with-store", cl::Hidden, cl::init(true),
cl::desc("DAG combiner enable load/<replace bytes>/store with "
"a narrower store"));
static cl::opt<bool> EnableVectorFCopySignExtendRound(
"combiner-vector-fcopysign-extend-round", cl::Hidden, cl::init(false),
cl::desc(
"Enable merging extends and rounds into FCOPYSIGN on vector types"));
namespace {
class DAGCombiner { … };
class WorklistRemover : public SelectionDAG::DAGUpdateListener { … };
class WorklistInserter : public SelectionDAG::DAGUpdateListener { … };
}
void TargetLowering::DAGCombinerInfo::AddToWorklist(SDNode *N) { … }
SDValue TargetLowering::DAGCombinerInfo::
CombineTo(SDNode *N, ArrayRef<SDValue> To, bool AddTo) { … }
SDValue TargetLowering::DAGCombinerInfo::
CombineTo(SDNode *N, SDValue Res, bool AddTo) { … }
SDValue TargetLowering::DAGCombinerInfo::
CombineTo(SDNode *N, SDValue Res0, SDValue Res1, bool AddTo) { … }
bool TargetLowering::DAGCombinerInfo::
recursivelyDeleteUnusedNodes(SDNode *N) { … }
void TargetLowering::DAGCombinerInfo::
CommitTargetLoweringOpt(const TargetLowering::TargetLoweringOpt &TLO) { … }
void DAGCombiner::deleteAndRecombine(SDNode *N) { … }
static void zeroExtendToMatch(APInt &LHS, APInt &RHS, unsigned Offset = 0) { … }
bool DAGCombiner::isSetCCEquivalent(SDValue N, SDValue &LHS, SDValue &RHS,
SDValue &CC, bool MatchStrict) const { … }
bool DAGCombiner::isOneUseSetCC(SDValue N) const { … }
static bool isConstantSplatVectorMaskForType(SDNode *N, EVT ScalarTy) { … }
static bool isConstantOrConstantVector(SDValue N, bool NoOpaques = false) { … }
static bool isAnyConstantBuildVector(SDValue V, bool NoOpaques = false) { … }
static bool canSplitIdx(LoadSDNode *LD) { … }
bool DAGCombiner::reassociationCanBreakAddressingModePattern(unsigned Opc,
const SDLoc &DL,
SDNode *N,
SDValue N0,
SDValue N1) { … }
SDValue DAGCombiner::reassociateOpsCommutative(unsigned Opc, const SDLoc &DL,
SDValue N0, SDValue N1,
SDNodeFlags Flags) { … }
SDValue DAGCombiner::reassociateOps(unsigned Opc, const SDLoc &DL, SDValue N0,
SDValue N1, SDNodeFlags Flags) { … }
SDValue DAGCombiner::reassociateReduction(unsigned RedOpc, unsigned Opc,
const SDLoc &DL, EVT VT, SDValue N0,
SDValue N1, SDNodeFlags Flags) { … }
SDValue DAGCombiner::CombineTo(SDNode *N, const SDValue *To, unsigned NumTo,
bool AddTo) { … }
void DAGCombiner::
CommitTargetLoweringOpt(const TargetLowering::TargetLoweringOpt &TLO) { … }
bool DAGCombiner::SimplifyDemandedBits(SDValue Op, const APInt &DemandedBits,
const APInt &DemandedElts,
bool AssumeSingleUse) { … }
bool DAGCombiner::SimplifyDemandedVectorElts(SDValue Op,
const APInt &DemandedElts,
bool AssumeSingleUse) { … }
void DAGCombiner::ReplaceLoadWithPromotedLoad(SDNode *Load, SDNode *ExtLoad) { … }
SDValue DAGCombiner::PromoteOperand(SDValue Op, EVT PVT, bool &Replace) { … }
SDValue DAGCombiner::SExtPromoteOperand(SDValue Op, EVT PVT) { … }
SDValue DAGCombiner::ZExtPromoteOperand(SDValue Op, EVT PVT) { … }
SDValue DAGCombiner::PromoteIntBinOp(SDValue Op) { … }
SDValue DAGCombiner::PromoteIntShiftOp(SDValue Op) { … }
SDValue DAGCombiner::PromoteExtend(SDValue Op) { … }
bool DAGCombiner::PromoteLoad(SDValue Op) { … }
bool DAGCombiner::recursivelyDeleteUnusedNodes(SDNode *N) { … }
void DAGCombiner::Run(CombineLevel AtLevel) { … }
SDValue DAGCombiner::visit(SDNode *N) { … }
SDValue DAGCombiner::combine(SDNode *N) { … }
static SDValue getInputChainForNode(SDNode *N) { … }
SDValue DAGCombiner::visitTokenFactor(SDNode *N) { … }
SDValue DAGCombiner::visitMERGE_VALUES(SDNode *N) { … }
static ConstantSDNode *getAsNonOpaqueConstant(SDValue N) { … }
static bool isTruncateOf(SelectionDAG &DAG, SDValue N, SDValue &Op,
KnownBits &Known) { … }
static bool canFoldInAddressingMode(SDNode *N, SDNode *Use, SelectionDAG &DAG,
const TargetLowering &TLI) { … }
static SDValue foldSelectWithIdentityConstant(SDNode *N, SelectionDAG &DAG,
bool ShouldCommuteOperands) { … }
SDValue DAGCombiner::foldBinOpIntoSelect(SDNode *BO) { … }
static SDValue foldAddSubBoolOfMaskedVal(SDNode *N, const SDLoc &DL,
SelectionDAG &DAG) { … }
SDValue DAGCombiner::foldSubToAvg(SDNode *N, const SDLoc &DL) { … }
static SDValue foldAddSubOfSignBit(SDNode *N, const SDLoc &DL,
SelectionDAG &DAG) { … }
static bool
areBitwiseNotOfEachother(SDValue Op0, SDValue Op1) { … }
SDValue DAGCombiner::visitADDLike(SDNode *N) { … }
SDValue DAGCombiner::foldAddToAvg(SDNode *N, const SDLoc &DL) { … }
SDValue DAGCombiner::visitADD(SDNode *N) { … }
SDValue DAGCombiner::visitADDSAT(SDNode *N) { … }
static SDValue getAsCarry(const TargetLowering &TLI, SDValue V,
bool ForceCarryReconstruction = false) { … }
static SDValue foldAddSubMasked1(bool IsAdd, SDValue N0, SDValue N1,
SelectionDAG &DAG, const SDLoc &DL) { … }
SDValue DAGCombiner::visitADDLikeCommutative(SDValue N0, SDValue N1,
SDNode *LocReference) { … }
SDValue DAGCombiner::visitADDC(SDNode *N) { … }
static SDValue extractBooleanFlip(SDValue V, SelectionDAG &DAG,
const TargetLowering &TLI,
bool Force) { … }
SDValue DAGCombiner::visitADDO(SDNode *N) { … }
SDValue DAGCombiner::visitUADDOLike(SDValue N0, SDValue N1, SDNode *N) { … }
SDValue DAGCombiner::visitADDE(SDNode *N) { … }
SDValue DAGCombiner::visitUADDO_CARRY(SDNode *N) { … }
static SDValue combineUADDO_CARRYDiamond(DAGCombiner &Combiner,
SelectionDAG &DAG, SDValue X,
SDValue Carry0, SDValue Carry1,
SDNode *N) { … }
static SDValue combineCarryDiamond(SelectionDAG &DAG, const TargetLowering &TLI,
SDValue N0, SDValue N1, SDNode *N) { … }
SDValue DAGCombiner::visitUADDO_CARRYLike(SDValue N0, SDValue N1,
SDValue CarryIn, SDNode *N) { … }
SDValue DAGCombiner::visitSADDO_CARRYLike(SDValue N0, SDValue N1,
SDValue CarryIn, SDNode *N) { … }
SDValue DAGCombiner::visitSADDO_CARRY(SDNode *N) { … }
static SDValue getTruncatedUSUBSAT(EVT DstVT, EVT SrcVT, SDValue LHS,
SDValue RHS, SelectionDAG &DAG,
const SDLoc &DL) { … }
SDValue DAGCombiner::foldSubToUSubSat(EVT DstVT, SDNode *N, const SDLoc &DL) { … }
template <class MatchContextClass>
static SDValue foldSubCtlzNot(SDNode *N, SelectionDAG &DAG) { … }
static SDValue tryFoldToZero(const SDLoc &DL, const TargetLowering &TLI, EVT VT,
SelectionDAG &DAG, bool LegalOperations) { … }
SDValue DAGCombiner::visitSUB(SDNode *N) { … }
SDValue DAGCombiner::visitSUBSAT(SDNode *N) { … }
SDValue DAGCombiner::visitSUBC(SDNode *N) { … }
SDValue DAGCombiner::visitSUBO(SDNode *N) { … }
SDValue DAGCombiner::visitSUBE(SDNode *N) { … }
SDValue DAGCombiner::visitUSUBO_CARRY(SDNode *N) { … }
SDValue DAGCombiner::visitSSUBO_CARRY(SDNode *N) { … }
SDValue DAGCombiner::visitMULFIX(SDNode *N) { … }
template <class MatchContextClass> SDValue DAGCombiner::visitMUL(SDNode *N) { … }
static bool isDivRemLibcallAvailable(SDNode *Node, bool isSigned,
const TargetLowering &TLI) { … }
SDValue DAGCombiner::useDivRem(SDNode *Node) { … }
static SDValue simplifyDivRem(SDNode *N, SelectionDAG &DAG) { … }
SDValue DAGCombiner::visitSDIV(SDNode *N) { … }
static bool isDivisorPowerOfTwo(SDValue Divisor) { … }
SDValue DAGCombiner::visitSDIVLike(SDValue N0, SDValue N1, SDNode *N) { … }
SDValue DAGCombiner::visitUDIV(SDNode *N) { … }
SDValue DAGCombiner::visitUDIVLike(SDValue N0, SDValue N1, SDNode *N) { … }
SDValue DAGCombiner::buildOptimizedSREM(SDValue N0, SDValue N1, SDNode *N) { … }
SDValue DAGCombiner::visitREM(SDNode *N) { … }
SDValue DAGCombiner::visitMULHS(SDNode *N) { … }
SDValue DAGCombiner::visitMULHU(SDNode *N) { … }
SDValue DAGCombiner::visitAVG(SDNode *N) { … }
SDValue DAGCombiner::visitABD(SDNode *N) { … }
SDValue DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N, unsigned LoOp,
unsigned HiOp) { … }
SDValue DAGCombiner::visitSMUL_LOHI(SDNode *N) { … }
SDValue DAGCombiner::visitUMUL_LOHI(SDNode *N) { … }
SDValue DAGCombiner::visitMULO(SDNode *N) { … }
static SDValue isSaturatingMinMax(SDValue N0, SDValue N1, SDValue N2,
SDValue N3, ISD::CondCode CC, unsigned &BW,
bool &Unsigned, SelectionDAG &DAG) { … }
static SDValue PerformMinMaxFpToSatCombine(SDValue N0, SDValue N1, SDValue N2,
SDValue N3, ISD::CondCode CC,
SelectionDAG &DAG) { … }
static SDValue PerformUMinFpToSatCombine(SDValue N0, SDValue N1, SDValue N2,
SDValue N3, ISD::CondCode CC,
SelectionDAG &DAG) { … }
SDValue DAGCombiner::visitIMINMAX(SDNode *N) { … }
SDValue DAGCombiner::hoistLogicOpWithSameOpcodeHands(SDNode *N) { … }
SDValue DAGCombiner::foldLogicOfSetCCs(bool IsAnd, SDValue N0, SDValue N1,
const SDLoc &DL) { … }
static bool arebothOperandsNotSNan(SDValue Operand1, SDValue Operand2,
SelectionDAG &DAG) { … }
static bool arebothOperandsNotNan(SDValue Operand1, SDValue Operand2,
SelectionDAG &DAG) { … }
static unsigned getMinMaxOpcodeForFP(SDValue Operand1, SDValue Operand2,
ISD::CondCode CC, unsigned OrAndOpcode,
SelectionDAG &DAG,
bool isFMAXNUMFMINNUM_IEEE,
bool isFMAXNUMFMINNUM) { … }
static SDValue foldAndOrOfSETCC(SDNode *LogicOp, SelectionDAG &DAG) { … }
static SDValue combineSelectAsExtAnd(SDValue Cond, SDValue T, SDValue F,
const SDLoc &DL, SelectionDAG &DAG) { … }
SDValue DAGCombiner::visitANDLike(SDValue N0, SDValue N1, SDNode *N) { … }
bool DAGCombiner::isAndLoadExtLoad(ConstantSDNode *AndC, LoadSDNode *LoadN,
EVT LoadResultTy, EVT &ExtVT) { … }
bool DAGCombiner::isLegalNarrowLdSt(LSBaseSDNode *LDST,
ISD::LoadExtType ExtType, EVT &MemVT,
unsigned ShAmt) { … }
bool DAGCombiner::SearchForAndLoads(SDNode *N,
SmallVectorImpl<LoadSDNode*> &Loads,
SmallPtrSetImpl<SDNode*> &NodesWithConsts,
ConstantSDNode *Mask,
SDNode *&NodeToMask) { … }
bool DAGCombiner::BackwardsPropagateMask(SDNode *N) { … }
SDValue DAGCombiner::unfoldExtremeBitClearingToShifts(SDNode *N) { … }
static SDValue combineShiftAnd1ToBitTest(SDNode *And, SelectionDAG &DAG) { … }
static SDValue foldAndToUsubsat(SDNode *N, SelectionDAG &DAG, const SDLoc &DL) { … }
static SDValue foldLogicOfShifts(SDNode *N, SDValue LogicOp, SDValue ShiftOp,
SelectionDAG &DAG) { … }
static SDValue foldLogicTreeOfShifts(SDNode *N, SDValue LeftHand,
SDValue RightHand, SelectionDAG &DAG) { … }
SDValue DAGCombiner::visitAND(SDNode *N) { … }
SDValue DAGCombiner::MatchBSwapHWordLow(SDNode *N, SDValue N0, SDValue N1,
bool DemandHighBits) { … }
static bool isBSwapHWordElement(SDValue N, MutableArrayRef<SDNode *> Parts) { … }
static bool isBSwapHWordPair(SDValue N, MutableArrayRef<SDNode *> Parts) { … }
static SDValue matchBSwapHWordOrAndAnd(const TargetLowering &TLI,
SelectionDAG &DAG, SDNode *N, SDValue N0,
SDValue N1, EVT VT) { … }
SDValue DAGCombiner::MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1) { … }
SDValue DAGCombiner::visitORLike(SDValue N0, SDValue N1, const SDLoc &DL) { … }
static SDValue visitORCommutative(SelectionDAG &DAG, SDValue N0, SDValue N1,
SDNode *N) { … }
SDValue DAGCombiner::visitOR(SDNode *N) { … }
static SDValue stripConstantMask(const SelectionDAG &DAG, SDValue Op,
SDValue &Mask) { … }
static bool matchRotateHalf(const SelectionDAG &DAG, SDValue Op, SDValue &Shift,
SDValue &Mask) { … }
static SDValue extractShiftForRotate(SelectionDAG &DAG, SDValue OppShift,
SDValue ExtractFrom, SDValue &Mask,
const SDLoc &DL) { … }
static bool matchRotateSub(SDValue Pos, SDValue Neg, unsigned EltSize,
SelectionDAG &DAG, bool IsRotate) { … }
SDValue DAGCombiner::MatchRotatePosNeg(SDValue Shifted, SDValue Pos,
SDValue Neg, SDValue InnerPos,
SDValue InnerNeg, bool HasPos,
unsigned PosOpcode, unsigned NegOpcode,
const SDLoc &DL) { … }
SDValue DAGCombiner::MatchFunnelPosNeg(SDValue N0, SDValue N1, SDValue Pos,
SDValue Neg, SDValue InnerPos,
SDValue InnerNeg, bool HasPos,
unsigned PosOpcode, unsigned NegOpcode,
const SDLoc &DL) { … }
SDValue DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL) { … }
SDByteProvider;
static std::optional<SDByteProvider>
calculateByteProvider(SDValue Op, unsigned Index, unsigned Depth,
std::optional<uint64_t> VectorIndex,
unsigned StartingIndex = 0) { … }
static unsigned littleEndianByteAt(unsigned BW, unsigned i) { … }
static unsigned bigEndianByteAt(unsigned BW, unsigned i) { … }
static std::optional<bool> isBigEndian(const ArrayRef<int64_t> ByteOffsets,
int64_t FirstOffset) { … }
static SDValue stripTruncAndExt(SDValue Value) { … }
SDValue DAGCombiner::mergeTruncStores(StoreSDNode *N) { … }
SDValue DAGCombiner::MatchLoadCombine(SDNode *N) { … }
SDValue DAGCombiner::unfoldMaskedMerge(SDNode *N) { … }
SDValue DAGCombiner::visitXOR(SDNode *N) { … }
static SDValue combineShiftOfShiftedLogic(SDNode *Shift, SelectionDAG &DAG) { … }
SDValue DAGCombiner::visitShiftByConstant(SDNode *N) { … }
SDValue DAGCombiner::distributeTruncateThroughAnd(SDNode *N) { … }
SDValue DAGCombiner::visitRotate(SDNode *N) { … }
SDValue DAGCombiner::visitSHL(SDNode *N) { … }
static SDValue combineShiftToMULH(SDNode *N, const SDLoc &DL, SelectionDAG &DAG,
const TargetLowering &TLI) { … }
static SDValue foldBitOrderCrossLogicOp(SDNode *N, SelectionDAG &DAG) { … }
SDValue DAGCombiner::visitSRA(SDNode *N) { … }
SDValue DAGCombiner::visitSRL(SDNode *N) { … }
SDValue DAGCombiner::visitFunnelShift(SDNode *N) { … }
SDValue DAGCombiner::visitSHLSAT(SDNode *N) { … }
SDValue DAGCombiner::foldABSToABD(SDNode *N, const SDLoc &DL) { … }
SDValue DAGCombiner::visitABS(SDNode *N) { … }
SDValue DAGCombiner::visitBSWAP(SDNode *N) { … }
SDValue DAGCombiner::visitBITREVERSE(SDNode *N) { … }
SDValue DAGCombiner::visitCTLZ(SDNode *N) { … }
SDValue DAGCombiner::visitCTLZ_ZERO_UNDEF(SDNode *N) { … }
SDValue DAGCombiner::visitCTTZ(SDNode *N) { … }
SDValue DAGCombiner::visitCTTZ_ZERO_UNDEF(SDNode *N) { … }
SDValue DAGCombiner::visitCTPOP(SDNode *N) { … }
static bool isLegalToCombineMinNumMaxNum(SelectionDAG &DAG, SDValue LHS,
SDValue RHS, const SDNodeFlags Flags,
const TargetLowering &TLI) { … }
static SDValue combineMinNumMaxNumImpl(const SDLoc &DL, EVT VT, SDValue LHS,
SDValue RHS, SDValue True, SDValue False,
ISD::CondCode CC,
const TargetLowering &TLI,
SelectionDAG &DAG) { … }
SDValue DAGCombiner::combineMinNumMaxNum(const SDLoc &DL, EVT VT, SDValue LHS,
SDValue RHS, SDValue True,
SDValue False, ISD::CondCode CC) { … }
static SDValue foldSelectOfConstantsUsingSra(SDNode *N, const SDLoc &DL,
SelectionDAG &DAG) { … }
static bool shouldConvertSelectOfConstantsToMath(const SDValue &Cond, EVT VT,
const TargetLowering &TLI) { … }
SDValue DAGCombiner::foldSelectOfConstants(SDNode *N) { … }
template <class MatchContextClass>
static SDValue foldBoolSelectToLogic(SDNode *N, const SDLoc &DL,
SelectionDAG &DAG) { … }
static SDValue foldVSelectToSignBitSplatMask(SDNode *N, SelectionDAG &DAG) { … }
SDValue DAGCombiner::foldSelectToABD(SDValue LHS, SDValue RHS, SDValue True,
SDValue False, ISD::CondCode CC,
const SDLoc &DL) { … }
SDValue DAGCombiner::visitSELECT(SDNode *N) { … }
static SDValue ConvertSelectToConcatVector(SDNode *N, SelectionDAG &DAG) { … }
bool refineUniformBase(SDValue &BasePtr, SDValue &Index, bool IndexIsScaled,
SelectionDAG &DAG, const SDLoc &DL) { … }
bool refineIndexType(SDValue &Index, ISD::MemIndexType &IndexType, EVT DataVT,
SelectionDAG &DAG) { … }
SDValue DAGCombiner::visitVPSCATTER(SDNode *N) { … }
SDValue DAGCombiner::visitMSCATTER(SDNode *N) { … }
SDValue DAGCombiner::visitMSTORE(SDNode *N) { … }
SDValue DAGCombiner::visitVP_STRIDED_STORE(SDNode *N) { … }
SDValue DAGCombiner::visitVECTOR_COMPRESS(SDNode *N) { … }
SDValue DAGCombiner::visitVPGATHER(SDNode *N) { … }
SDValue DAGCombiner::visitMGATHER(SDNode *N) { … }
SDValue DAGCombiner::visitMLOAD(SDNode *N) { … }
SDValue DAGCombiner::visitVP_STRIDED_LOAD(SDNode *N) { … }
SDValue DAGCombiner::foldVSelectOfConstants(SDNode *N) { … }
SDValue DAGCombiner::visitVP_SELECT(SDNode *N) { … }
SDValue DAGCombiner::visitVSELECT(SDNode *N) { … }
SDValue DAGCombiner::visitSELECT_CC(SDNode *N) { … }
SDValue DAGCombiner::visitSETCC(SDNode *N) { … }
SDValue DAGCombiner::visitSETCCCARRY(SDNode *N) { … }
static bool isCompatibleLoad(SDValue N, unsigned ExtOpcode) { … }
static SDValue tryToFoldExtendSelectLoad(SDNode *N, const TargetLowering &TLI,
SelectionDAG &DAG, const SDLoc &DL,
CombineLevel Level) { … }
static SDValue tryToFoldExtendOfConstant(SDNode *N, const SDLoc &DL,
const TargetLowering &TLI,
SelectionDAG &DAG, bool LegalTypes) { … }
static bool ExtendUsesToFormExtLoad(EVT VT, SDNode *N, SDValue N0,
unsigned ExtOpc,
SmallVectorImpl<SDNode *> &ExtendNodes,
const TargetLowering &TLI) { … }
void DAGCombiner::ExtendSetCCUses(const SmallVectorImpl<SDNode *> &SetCCs,
SDValue OrigLoad, SDValue ExtLoad,
ISD::NodeType ExtType) { … }
SDValue DAGCombiner::CombineExtLoad(SDNode *N) { … }
SDValue DAGCombiner::CombineZExtLogicopShiftLoad(SDNode *N) { … }
SDValue DAGCombiner::matchVSelectOpSizesWithSetCC(SDNode *Cast) { … }
static SDValue tryToFoldExtOfExtload(SelectionDAG &DAG, DAGCombiner &Combiner,
const TargetLowering &TLI, EVT VT,
bool LegalOperations, SDNode *N,
SDValue N0, ISD::LoadExtType ExtLoadType) { … }
static SDValue tryToFoldExtOfLoad(SelectionDAG &DAG, DAGCombiner &Combiner,
const TargetLowering &TLI, EVT VT,
bool LegalOperations, SDNode *N, SDValue N0,
ISD::LoadExtType ExtLoadType,
ISD::NodeType ExtOpc,
bool NonNegZExt = false) { … }
static SDValue
tryToFoldExtOfMaskedLoad(SelectionDAG &DAG, const TargetLowering &TLI, EVT VT,
bool LegalOperations, SDNode *N, SDValue N0,
ISD::LoadExtType ExtLoadType, ISD::NodeType ExtOpc) { … }
static SDValue tryToFoldExtOfAtomicLoad(SelectionDAG &DAG,
const TargetLowering &TLI, EVT VT,
SDValue N0,
ISD::LoadExtType ExtLoadType) { … }
static SDValue foldExtendedSignBitTest(SDNode *N, SelectionDAG &DAG,
bool LegalOperations) { … }
SDValue DAGCombiner::foldSextSetcc(SDNode *N) { … }
SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) { … }
static SDValue widenCtPop(SDNode *Extend, SelectionDAG &DAG, const SDLoc &DL) { … }
static SDValue widenAbs(SDNode *Extend, SelectionDAG &DAG) { … }
SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) { … }
SDValue DAGCombiner::visitANY_EXTEND(SDNode *N) { … }
SDValue DAGCombiner::visitAssertExt(SDNode *N) { … }
SDValue DAGCombiner::visitAssertAlign(SDNode *N) { … }
SDValue DAGCombiner::reduceLoadWidth(SDNode *N) { … }SDValue DAGCombiner::visitSIGN_EXTEND_INREG(SDNode *N) { … }static SDValue foldExtendVectorInregToExtendOfSubvector(
SDNode *N, const SDLoc &DL, const TargetLowering &TLI, SelectionDAG &DAG,
bool LegalOperations) { … }SDValue DAGCombiner::visitEXTEND_VECTOR_INREG(SDNode *N) { … }SDValue DAGCombiner::visitTRUNCATE_USAT_U(SDNode *N) { … }static SDValue detectUSatUPattern(SDValue In, EVT VT) { … }static SDValue detectSSatSPattern(SDValue In, EVT VT) { … }static SDValue detectSSatUPattern(SDValue In, EVT VT, SelectionDAG &DAG,
const SDLoc &DL) { … }static SDValue foldToSaturated(SDNode *N, EVT &VT, SDValue &Src, EVT &SrcVT,
SDLoc &DL, const TargetLowering &TLI,
SelectionDAG &DAG) { … }SDValue DAGCombiner::visitTRUNCATE(SDNode *N) { … }static SDNode *getBuildPairElt(SDNode *N, unsigned i) { … }SDValue DAGCombiner::CombineConsecutiveLoads(SDNode *N, EVT VT) { … }static unsigned getPPCf128HiElementSelector(const SelectionDAG &DAG) { … }SDValue DAGCombiner::foldBitcastedFPLogic(SDNode *N, SelectionDAG &DAG,
const TargetLowering &TLI) { … }SDValue DAGCombiner::visitBITCAST(SDNode *N) { … }SDValue DAGCombiner::visitBUILD_PAIR(SDNode *N) { … }SDValue DAGCombiner::visitFREEZE(SDNode *N) { … }SDValue DAGCombiner::
ConstantFoldBITCASTofBUILD_VECTOR(SDNode *BV, EVT DstEltVT) { … }static bool isContractableFMUL(const TargetOptions &Options, SDValue N) { … }static bool hasNoInfs(const TargetOptions &Options, SDValue N) { … }template <class MatchContextClass>
SDValue DAGCombiner::visitFADDForFMACombine(SDNode *N) { … }template <class MatchContextClass>
SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) { … }SDValue DAGCombiner::visitFMULForFMADistributiveCombine(SDNode *N) { … }SDValue DAGCombiner::visitVP_FADD(SDNode *N) { … }SDValue DAGCombiner::visitFADD(SDNode *N) { … }SDValue DAGCombiner::visitSTRICT_FADD(SDNode *N) { … }SDValue DAGCombiner::visitFSUB(SDNode *N) { … }SDValue DAGCombiner::combineFMulOrFDivWithIntPow2(SDNode *N) { … }SDValue DAGCombiner::visitFMUL(SDNode *N) { … }template <class MatchContextClass> SDValue DAGCombiner::visitFMA(SDNode *N) { … }SDValue DAGCombiner::visitFMAD(SDNode *N) { … }SDValue DAGCombiner::combineRepeatedFPDivisors(SDNode *N) { … }SDValue DAGCombiner::visitFDIV(SDNode *N) { … }SDValue DAGCombiner::visitFREM(SDNode *N) { … }SDValue DAGCombiner::visitFSQRT(SDNode *N) { … }static inline bool CanCombineFCOPYSIGN_EXTEND_ROUND(EVT XTy, EVT YTy) { … }static inline bool CanCombineFCOPYSIGN_EXTEND_ROUND(SDNode *N) { … }SDValue DAGCombiner::visitFCOPYSIGN(SDNode *N) { … }SDValue DAGCombiner::visitFPOW(SDNode *N) { … }static SDValue foldFPToIntToFP(SDNode *N, SelectionDAG &DAG,
const TargetLowering &TLI) { … }SDValue DAGCombiner::visitSINT_TO_FP(SDNode *N) { … }SDValue DAGCombiner::visitUINT_TO_FP(SDNode *N) { … }static SDValue FoldIntToFPToInt(SDNode *N, SelectionDAG &DAG) { … }SDValue DAGCombiner::visitFP_TO_SINT(SDNode *N) { … }SDValue DAGCombiner::visitFP_TO_UINT(SDNode *N) { … }SDValue DAGCombiner::visitXROUND(SDNode *N) { … }SDValue DAGCombiner::visitFP_ROUND(SDNode *N) { … }SDValue DAGCombiner::visitFP_EXTEND(SDNode *N) { … }SDValue DAGCombiner::visitFCEIL(SDNode *N) { … }SDValue DAGCombiner::visitFTRUNC(SDNode *N) { … }SDValue DAGCombiner::visitFFREXP(SDNode *N) { … }SDValue DAGCombiner::visitFFLOOR(SDNode *N) { … }SDValue DAGCombiner::visitFNEG(SDNode *N) { … }SDValue DAGCombiner::visitFMinMax(SDNode *N) { … }SDValue DAGCombiner::visitFABS(SDNode *N) { … }SDValue DAGCombiner::visitBRCOND(SDNode *N) { … }SDValue DAGCombiner::rebuildSetCC(SDValue N) { … }SDValue DAGCombiner::visitBR_CC(SDNode *N) { … }static bool getCombineLoadStoreParts(SDNode *N, unsigned Inc, unsigned Dec,
bool &IsLoad, bool &IsMasked, SDValue &Ptr,
const TargetLowering &TLI) { … }bool DAGCombiner::CombineToPreIndexedLoadStore(SDNode *N) { … }static bool shouldCombineToPostInc(SDNode *N, SDValue Ptr, SDNode *PtrUse,
SDValue &BasePtr, SDValue &Offset,
ISD::MemIndexedMode &AM,
SelectionDAG &DAG,
const TargetLowering &TLI) { … }static SDNode *getPostIndexedLoadStoreOp(SDNode *N, bool &IsLoad,
bool &IsMasked, SDValue &Ptr,
SDValue &BasePtr, SDValue &Offset,
ISD::MemIndexedMode &AM,
SelectionDAG &DAG,
const TargetLowering &TLI) { … }bool DAGCombiner::CombineToPostIndexedLoadStore(SDNode *N) { … }SDValue DAGCombiner::SplitIndexingFromLoad(LoadSDNode *LD) { … }static inline ElementCount numVectorEltsOrZero(EVT T) { … }bool DAGCombiner::getTruncatedStoreValue(StoreSDNode *ST, SDValue &Val) { … }bool DAGCombiner::extendLoadedValueToExtension(LoadSDNode *LD, SDValue &Val) { … }StoreSDNode *DAGCombiner::getUniqueStoreFeeding(LoadSDNode *LD,
int64_t &Offset) { … }SDValue DAGCombiner::ForwardStoreValueToDirectLoad(LoadSDNode *LD) { … }SDValue DAGCombiner::visitLOAD(SDNode *N) { … }struct LoadedSlice { … }static bool areUsedBitsDense(const APInt &UsedBits) { … }static bool areSlicesNextToEachOther(const LoadedSlice &First,
const LoadedSlice &Second) { … }static void adjustCostForPairing(SmallVectorImpl<LoadedSlice> &LoadedSlices,
LoadedSlice::Cost &GlobalLSCost) { … }static bool isSlicingProfitable(SmallVectorImpl<LoadedSlice> &LoadedSlices,
const APInt &UsedBits, bool ForCodeSize) { … }bool DAGCombiner::SliceUpLoad(SDNode *N) { … }static std::pair<unsigned, unsigned>
CheckForMaskedLoad(SDValue V, SDValue Ptr, SDValue Chain) { … }static SDValue
ShrinkLoadReplaceStoreWithStore(const std::pair<unsigned, unsigned> &MaskInfo,
SDValue IVal, StoreSDNode *St,
DAGCombiner *DC) { … }SDValue DAGCombiner::ReduceLoadOpStoreWidth(SDNode *N) { … }SDValue DAGCombiner::TransformFPLoadStorePair(SDNode *N) { … }bool DAGCombiner::isMulAddWithConstProfitable(SDNode *MulNode, SDValue AddNode,
SDValue ConstNode) { … }SDValue DAGCombiner::getMergeStoreChains(SmallVectorImpl<MemOpLink> &StoreNodes,
unsigned NumStores) { … }bool DAGCombiner::hasSameUnderlyingObj(ArrayRef<MemOpLink> StoreNodes) { … }bool DAGCombiner::mergeStoresOfConstantsOrVecElts(
SmallVectorImpl<MemOpLink> &StoreNodes, EVT MemVT, unsigned NumStores,
bool IsConstantSrc, bool UseVector, bool UseTrunc) { … }SDNode *
DAGCombiner::getStoreMergeCandidates(StoreSDNode *St,
SmallVectorImpl<MemOpLink> &StoreNodes) { … }bool DAGCombiner::checkMergeStoreCandidatesForDependencies(
SmallVectorImpl<MemOpLink> &StoreNodes, unsigned NumStores,
SDNode *RootNode) { … }unsigned
DAGCombiner::getConsecutiveStores(SmallVectorImpl<MemOpLink> &StoreNodes,
int64_t ElementSizeBytes) const { … }bool DAGCombiner::tryStoreMergeOfConstants(
SmallVectorImpl<MemOpLink> &StoreNodes, unsigned NumConsecutiveStores,
EVT MemVT, SDNode *RootNode, bool AllowVectors) { … }bool DAGCombiner::tryStoreMergeOfExtracts(
SmallVectorImpl<MemOpLink> &StoreNodes, unsigned NumConsecutiveStores,
EVT MemVT, SDNode *RootNode) { … }bool DAGCombiner::tryStoreMergeOfLoads(SmallVectorImpl<MemOpLink> &StoreNodes,
unsigned NumConsecutiveStores, EVT MemVT,
SDNode *RootNode, bool AllowVectors,
bool IsNonTemporalStore,
bool IsNonTemporalLoad) { … }bool DAGCombiner::mergeConsecutiveStores(StoreSDNode *St) { … }SDValue DAGCombiner::replaceStoreChain(StoreSDNode *ST, SDValue BetterChain) { … }SDValue DAGCombiner::replaceStoreOfFPConstant(StoreSDNode *ST) { … }SDValue DAGCombiner::replaceStoreOfInsertLoad(StoreSDNode *ST) { … }SDValue DAGCombiner::visitATOMIC_STORE(SDNode *N) { … }SDValue DAGCombiner::visitSTORE(SDNode *N) { … }SDValue DAGCombiner::visitLIFETIME_END(SDNode *N) { … }SDValue DAGCombiner::splitMergedValStore(StoreSDNode *ST) { … }static bool mergeEltWithShuffle(SDValue &X, SDValue &Y, ArrayRef<int> Mask,
SmallVectorImpl<int> &NewMask, SDValue Elt,
unsigned InsIndex) { … }SDValue DAGCombiner::mergeInsertEltWithShuffle(SDNode *N, unsigned InsIndex) { … }SDValue DAGCombiner::combineInsertEltToShuffle(SDNode *N, unsigned InsIndex) { … }SDValue DAGCombiner::combineInsertEltToLoad(SDNode *N, unsigned InsIndex) { … }SDValue DAGCombiner::visitINSERT_VECTOR_ELT(SDNode *N) { … }SDValue DAGCombiner::scalarizeExtractedVectorLoad(SDNode *EVE, EVT InVecVT,
SDValue EltNo,
LoadSDNode *OriginalLoad) { … }static SDValue scalarizeExtractedBinop(SDNode *ExtElt, SelectionDAG &DAG,
const SDLoc &DL, bool LegalOperations) { … }bool DAGCombiner::refineExtractVectorEltIntoMultipleNarrowExtractVectorElts(
SDNode *N) { … }SDValue DAGCombiner::visitEXTRACT_VECTOR_ELT(SDNode *N) { … }SDValue DAGCombiner::reduceBuildVecExtToExtBuildVec(SDNode *N) { … }SDValue DAGCombiner::reduceBuildVecTruncToBitCast(SDNode *N) { … }SDValue DAGCombiner::createBuildVecShuffle(const SDLoc &DL, SDNode *N,
ArrayRef<int> VectorMask,
SDValue VecIn1, SDValue VecIn2,
unsigned LeftIdx, bool DidSplitVec) { … }static SDValue reduceBuildVecToShuffleWithZero(SDNode *BV, SelectionDAG &DAG) { … }template <typename R, typename T>
static auto getFirstIndexOf(R &&Range, const T &Val) { … }SDValue DAGCombiner::reduceBuildVecToShuffle(SDNode *N) { … }SDValue DAGCombiner::convertBuildVecZextToZext(SDNode *N) { … }SDValue DAGCombiner::convertBuildVecZextToBuildVecWithZeros(SDNode *N) { … }SDValue DAGCombiner::visitBUILD_VECTOR(SDNode *N) { … }static SDValue combineConcatVectorOfScalars(SDNode *N, SelectionDAG &DAG) { … }static SDValue combineConcatVectorOfConcatVectors(SDNode *N,
SelectionDAG &DAG) { … }static SDValue combineConcatVectorOfExtracts(SDNode *N, SelectionDAG &DAG) { … }static SDValue combineConcatVectorOfCasts(SDNode *N, SelectionDAG &DAG) { … }static SDValue combineConcatVectorOfShuffleAndItsOperands(
SDNode *N, SelectionDAG &DAG, const TargetLowering &TLI, bool LegalTypes,
bool LegalOperations) { … }SDValue DAGCombiner::visitCONCAT_VECTORS(SDNode *N) { … }static SDValue getSubVectorSrc(SDValue V, SDValue Index, EVT SubVT) { … }static SDValue narrowInsertExtractVectorBinOp(SDNode *Extract,
SelectionDAG &DAG,
bool LegalOperations) { … }static SDValue narrowExtractedVectorBinOp(SDNode *Extract, SelectionDAG &DAG,
bool LegalOperations) { … }static SDValue narrowExtractedVectorLoad(SDNode *Extract, SelectionDAG &DAG) { … }static SDValue foldExtractSubvectorFromShuffleVector(SDNode *N,
SelectionDAG &DAG,
const TargetLowering &TLI,
bool LegalOperations) { … }SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode *N) { … }static SDValue foldShuffleOfConcatUndefs(ShuffleVectorSDNode *Shuf,
SelectionDAG &DAG) { … }static SDValue partitionShuffleOfConcats(SDNode *N, SelectionDAG &DAG) { … }static SDValue combineShuffleOfScalars(ShuffleVectorSDNode *SVN,
SelectionDAG &DAG,
const TargetLowering &TLI) { … }static std::optional<EVT> canCombineShuffleToExtendVectorInreg(
unsigned Opcode, EVT VT, std::function<bool(unsigned)> Match,
SelectionDAG &DAG, const TargetLowering &TLI, bool LegalTypes,
bool LegalOperations) { … }static SDValue combineShuffleToAnyExtendVectorInreg(ShuffleVectorSDNode *SVN,
SelectionDAG &DAG,
const TargetLowering &TLI,
bool LegalOperations) { … }static SDValue combineShuffleToZeroExtendVectorInReg(ShuffleVectorSDNode *SVN,
SelectionDAG &DAG,
const TargetLowering &TLI,
bool LegalOperations) { … }static SDValue combineTruncationShuffle(ShuffleVectorSDNode *SVN,
SelectionDAG &DAG) { … }static SDValue combineShuffleOfSplatVal(ShuffleVectorSDNode *Shuf,
SelectionDAG &DAG) { … }static SDValue combineShuffleOfBitcast(ShuffleVectorSDNode *SVN,
SelectionDAG &DAG,
const TargetLowering &TLI,
bool LegalOperations) { … }static SDValue formSplatFromShuffles(ShuffleVectorSDNode *OuterShuf,
SelectionDAG &DAG) { … }static int getShuffleMaskIndexOfOneElementFromOp0IntoOp1(ArrayRef<int> Mask) { … }static SDValue replaceShuffleOfInsert(ShuffleVectorSDNode *Shuf,
SelectionDAG &DAG) { … }static SDValue simplifyShuffleOfShuffle(ShuffleVectorSDNode *Shuf) { … }SDValue DAGCombiner::visitVECTOR_SHUFFLE(SDNode *N) { … }SDValue DAGCombiner::visitSCALAR_TO_VECTOR(SDNode *N) { … }SDValue DAGCombiner::visitINSERT_SUBVECTOR(SDNode *N) { … }SDValue DAGCombiner::visitFP_TO_FP16(SDNode *N) { … }SDValue DAGCombiner::visitFP16_TO_FP(SDNode *N) { … }SDValue DAGCombiner::visitFP_TO_BF16(SDNode *N) { … }SDValue DAGCombiner::visitBF16_TO_FP(SDNode *N) { … }SDValue DAGCombiner::visitVECREDUCE(SDNode *N) { … }SDValue DAGCombiner::visitVP_FSUB(SDNode *N) { … }SDValue DAGCombiner::visitVPOp(SDNode *N) { … }SDValue DAGCombiner::visitGET_FPENV_MEM(SDNode *N) { … }SDValue DAGCombiner::visitSET_FPENV_MEM(SDNode *N) { … }SDValue DAGCombiner::XformToShuffleWithZero(SDNode *N) { … }static SDValue scalarizeBinOpOfSplats(SDNode *N, SelectionDAG &DAG,
const SDLoc &DL, bool LegalTypes) { … }SDValue DAGCombiner::SimplifyVCastOp(SDNode *N, const SDLoc &DL) { … }SDValue DAGCombiner::SimplifyVBinOp(SDNode *N, const SDLoc &DL) { … }SDValue DAGCombiner::SimplifySelect(const SDLoc &DL, SDValue N0, SDValue N1,
SDValue N2) { … }bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
SDValue RHS) { … }SDValue DAGCombiner::foldSelectCCToShiftAnd(const SDLoc &DL, SDValue N0,
SDValue N1, SDValue N2, SDValue N3,
ISD::CondCode CC) { … }SDValue DAGCombiner::foldSelectOfBinops(SDNode *N) { … }SDValue DAGCombiner::foldSignChangeInBitcast(SDNode *N) { … }SDValue DAGCombiner::convertSelectOfFPConstantsToLoadOffset(
const SDLoc &DL, SDValue N0, SDValue N1, SDValue N2, SDValue N3,
ISD::CondCode CC) { … }SDValue DAGCombiner::SimplifySelectCC(const SDLoc &DL, SDValue N0, SDValue N1,
SDValue N2, SDValue N3, ISD::CondCode CC,
bool NotExtCompare) { … }SDValue DAGCombiner::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
ISD::CondCode Cond, const SDLoc &DL,
bool foldBooleans) { … }SDValue DAGCombiner::BuildSDIV(SDNode *N) { … }SDValue DAGCombiner::BuildSDIVPow2(SDNode *N) { … }SDValue DAGCombiner::BuildUDIV(SDNode *N) { … }SDValue DAGCombiner::BuildSREMPow2(SDNode *N) { … }static SDValue takeInexpensiveLog2(SelectionDAG &DAG, const SDLoc &DL, EVT VT,
SDValue Op, unsigned Depth,
bool AssumeNonZero) { … }SDValue DAGCombiner::BuildLogBase2(SDValue V, const SDLoc &DL,
bool KnownNonZero, bool InexpensiveOnly,
std::optional<EVT> OutVT) { … }SDValue DAGCombiner::BuildDivEstimate(SDValue N, SDValue Op,
SDNodeFlags Flags) { … }SDValue DAGCombiner::buildSqrtNROneConst(SDValue Arg, SDValue Est,
unsigned Iterations,
SDNodeFlags Flags, bool Reciprocal) { … }SDValue DAGCombiner::buildSqrtNRTwoConst(SDValue Arg, SDValue Est,
unsigned Iterations,
SDNodeFlags Flags, bool Reciprocal) { … }SDValue DAGCombiner::buildSqrtEstimateImpl(SDValue Op, SDNodeFlags Flags,
bool Reciprocal) { … }SDValue DAGCombiner::buildRsqrtEstimate(SDValue Op, SDNodeFlags Flags) { … }SDValue DAGCombiner::buildSqrtEstimate(SDValue Op, SDNodeFlags Flags) { … }bool DAGCombiner::mayAlias(SDNode *Op0, SDNode *Op1) const { … }void DAGCombiner::GatherAllAliases(SDNode *N, SDValue OriginalChain,
SmallVectorImpl<SDValue> &Aliases) { … }SDValue DAGCombiner::FindBetterChain(SDNode *N, SDValue OldChain) { … }bool DAGCombiner::parallelizeChainedStores(StoreSDNode *St) { … }bool DAGCombiner::findBetterNeighborChains(StoreSDNode *St) { … }void SelectionDAG::Combine(CombineLevel Level, AliasAnalysis *AA,
CodeGenOptLevel OptLevel) { … }