LLVM 22.0.0git
ARMISelLowering.cpp File Reference
#include "ARMISelLowering.h"
#include "ARMBaseInstrInfo.h"
#include "ARMBaseRegisterInfo.h"
#include "ARMCallingConv.h"
#include "ARMConstantPoolValue.h"
#include "ARMMachineFunctionInfo.h"
#include "ARMPerfectShuffle.h"
#include "ARMRegisterInfo.h"
#include "ARMSelectionDAGInfo.h"
#include "ARMSubtarget.h"
#include "ARMTargetTransformInfo.h"
#include "MCTargetDesc/ARMAddressingModes.h"
#include "MCTargetDesc/ARMBaseInfo.h"
#include "Utils/ARMBaseInfo.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/ComplexDeinterleavingPass.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RuntimeLibcallUtil.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SelectionDAGAddressAnalysis.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetOpcodes.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/CallingConv.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsARM.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/User.h"
#include "llvm/IR/Value.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCInstrItineraries.h"
#include "llvm/MC/MCSchedule.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/BranchProbability.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/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 "llvm/TargetParser/Triple.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstdlib>
#include <iterator>
#include <limits>
#include <optional>
#include <tuple>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  BaseUpdateTarget
 Load/store instruction that can be merged with a base address update. More...
struct  BaseUpdateUser

Macros

#define DEBUG_TYPE   "arm-isel"
#define MAKE_CASE(V)

Typedefs

using RCPair = std::pair<unsigned, const TargetRegisterClass *>

Enumerations

enum  ShuffleOpCodes {
  OP_COPY = 0 , OP_VREV , OP_VDUP0 , OP_VDUP1 ,
  OP_VDUP2 , OP_VDUP3 , OP_VEXT1 , OP_VEXT2 ,
  OP_VEXT3 , OP_VUZPL , OP_VUZPR , OP_VZIPL ,
  OP_VZIPR , OP_VTRNL , OP_VTRNR
}
enum  HABaseType {
  HA_UNKNOWN = 0 , HA_FLOAT , HA_DOUBLE , HA_VECT64 ,
  HA_VECT128
}

Functions

 STATISTIC (NumTailCalls, "Number of tail calls")
 STATISTIC (NumMovwMovt, "Number of GAs materialized with movw + movt")
 STATISTIC (NumLoopByVals, "Number of loops generated for byval arguments")
 STATISTIC (NumConstpoolPromoted, "Number of constants with their storage promoted into constant pools")
static SDValue handleCMSEValue (const SDValue &Value, const ISD::InputArg &Arg, SelectionDAG &DAG, const SDLoc &DL)
static bool isSRL16 (const SDValue &Op)
static bool isSRA16 (const SDValue &Op)
static bool isSHL16 (const SDValue &Op)
static bool isS16 (const SDValue &Op, SelectionDAG &DAG)
static ARMCC::CondCodes IntCCToARMCC (ISD::CondCode CC)
 IntCCToARMCC - Convert a DAG integer condition code to an ARM CC.
static void FPCCToARMCC (ISD::CondCode CC, ARMCC::CondCodes &CondCode, ARMCC::CondCodes &CondCode2)
 FPCCToARMCC - Convert a DAG fp condition code to an ARM CC.
static bool canGuaranteeTCO (CallingConv::ID CC, bool GuaranteeTailCalls)
static SDValue LowerInterruptReturn (SmallVectorImpl< SDValue > &RetOps, const SDLoc &DL, SelectionDAG &DAG)
static SDValue LowerWRITE_REGISTER (SDValue Op, SelectionDAG &DAG)
static bool allUsersAreInFunction (const Value *V, const Function *F)
 Return true if all users of V are within function F, looking through ConstantExprs.
static SDValue promoteToConstantPool (const ARMTargetLowering *TLI, const GlobalValue *GV, SelectionDAG &DAG, EVT PtrVT, const SDLoc &dl)
static SDValue LowerATOMIC_FENCE (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue LowerPREFETCH (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue LowerVASTART (SDValue Op, SelectionDAG &DAG)
static bool isFloatingPointZero (SDValue Op)
 isFloatingPointZero - Return true if this is +0.0.
static SDValue ConvertBooleanCarryToCarryFlag (SDValue BoolCarry, SelectionDAG &DAG)
static SDValue ConvertCarryFlagToBooleanCarry (SDValue Flags, EVT VT, SelectionDAG &DAG)
static SDValue LowerADDSUBSAT (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static void checkVSELConstraints (ISD::CondCode CC, ARMCC::CondCodes &CondCode, bool &swpCmpOps, bool &swpVselOps)
static bool isGTorGE (ISD::CondCode CC)
static bool isLTorLE (ISD::CondCode CC)
static bool isLowerSaturate (const SDValue LHS, const SDValue RHS, const SDValue TrueVal, const SDValue FalseVal, const ISD::CondCode CC, const SDValue K)
static SDValue LowerSaturatingConditional (SDValue Op, SelectionDAG &DAG)
static bool isLowerSaturatingConditional (const SDValue &Op, SDValue &V, SDValue &SatK)
static bool canChangeToInt (SDValue Op, bool &SeenZero, const ARMSubtarget *Subtarget)
 canChangeToInt - Given the fp compare operand, return true if it is suitable to morph to an integer compare sequence.
static SDValue bitcastf32Toi32 (SDValue Op, SelectionDAG &DAG)
static void expandf64Toi32 (SDValue Op, SelectionDAG &DAG, SDValue &RetVal1, SDValue &RetVal2)
static SDValue LowerVectorFP_TO_INT (SDValue Op, SelectionDAG &DAG)
static SDValue LowerFP_TO_INT_SAT (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue LowerVectorINT_TO_FP (SDValue Op, SelectionDAG &DAG)
static void ExpandREAD_REGISTER (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG)
static SDValue CombineVMOVDRRCandidateWithVecOp (const SDNode *BC, SelectionDAG &DAG)
 BC is a bitcast that is about to be turned into a VMOVDRR.
static SDValue getZeroVector (EVT VT, SelectionDAG &DAG, const SDLoc &dl)
 getZeroVector - Returns a vector of specified type with all zero elements.
static SDValue LowerCTTZ (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerCTPOP (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *ST)
static bool getVShiftImm (SDValue Op, unsigned ElementBits, int64_t &Cnt)
 Getvshiftimm - Check if this is a valid build_vector for the immediate operand of a vector shift operation, where all the elements of the build_vector must have the same constant integer value.
static bool isVShiftLImm (SDValue Op, EVT VT, bool isLong, int64_t &Cnt)
 isVShiftLImm - Check if this is a valid build_vector for the immediate operand of a vector shift left operation.
static bool isVShiftRImm (SDValue Op, EVT VT, bool isNarrow, bool isIntrinsic, int64_t &Cnt)
 isVShiftRImm - Check if this is a valid build_vector for the immediate operand of a vector shift right operation.
static SDValue LowerShift (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue Expand64BitShift (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerVSETCC (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerSETCCCARRY (SDValue Op, SelectionDAG &DAG)
static SDValue isVMOVModifiedImm (uint64_t SplatBits, uint64_t SplatUndef, unsigned SplatBitSize, SelectionDAG &DAG, const SDLoc &dl, EVT &VT, EVT VectorVT, VMOVModImmType type)
 isVMOVModifiedImm - Check if the specified splat value corresponds to a valid vector constant for a NEON or MVE instruction with a "modified immediate" operand (e.g., VMOV).
static bool isSingletonVEXTMask (ArrayRef< int > M, EVT VT, unsigned &Imm)
static bool isVEXTMask (ArrayRef< int > M, EVT VT, bool &ReverseVEXT, unsigned &Imm)
static bool isVTBLMask (ArrayRef< int > M, EVT VT)
static unsigned SelectPairHalf (unsigned Elements, ArrayRef< int > Mask, unsigned Index)
static bool isVTRNMask (ArrayRef< int > M, EVT VT, unsigned &WhichResult)
static bool isVTRN_v_undef_Mask (ArrayRef< int > M, EVT VT, unsigned &WhichResult)
 isVTRN_v_undef_Mask - Special case of isVTRNMask for canonical form of "vector_shuffle v, v", i.e., "vector_shuffle v, undef".
static bool isVUZPMask (ArrayRef< int > M, EVT VT, unsigned &WhichResult)
static bool isVUZP_v_undef_Mask (ArrayRef< int > M, EVT VT, unsigned &WhichResult)
 isVUZP_v_undef_Mask - Special case of isVUZPMask for canonical form of "vector_shuffle v, v", i.e., "vector_shuffle v, undef".
static bool isVZIPMask (ArrayRef< int > M, EVT VT, unsigned &WhichResult)
static bool isVZIP_v_undef_Mask (ArrayRef< int > M, EVT VT, unsigned &WhichResult)
 isVZIP_v_undef_Mask - Special case of isVZIPMask for canonical form of "vector_shuffle v, v", i.e., "vector_shuffle v, undef".
static unsigned isNEONTwoResultShuffleMask (ArrayRef< int > ShuffleMask, EVT VT, unsigned &WhichResult, bool &isV_UNDEF)
 Check if ShuffleMask is a NEON two-result shuffle (VZIP, VUZP, VTRN), and return the corresponding ARMISD opcode if it is, or 0 if it isn't.
static bool isReverseMask (ArrayRef< int > M, EVT VT)
static bool isTruncMask (ArrayRef< int > M, EVT VT, bool Top, bool SingleSource)
static bool isVMOVNMask (ArrayRef< int > M, EVT VT, bool Top, bool SingleSource)
static bool isVMOVNTruncMask (ArrayRef< int > M, EVT ToVT, bool rev)
static SDValue LowerBuildVectorOfFPTrunc (SDValue BV, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerBuildVectorOfFPExt (SDValue BV, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue IsSingleInstrConstant (SDValue N, SelectionDAG &DAG, const ARMSubtarget *ST, const SDLoc &dl)
static SDValue LowerBUILD_VECTOR_i1 (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerBUILD_VECTORToVIDUP (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static bool IsQRMVEInstruction (const SDNode *N, const SDNode *Op)
static bool isLegalMVEShuffleOp (unsigned PFEntry)
static SDValue GeneratePerfectShuffle (unsigned PFEntry, SDValue LHS, SDValue RHS, SelectionDAG &DAG, const SDLoc &dl)
 GeneratePerfectShuffle - Given an entry in the perfect-shuffle table, emit the specified operations to build the shuffle.
static SDValue LowerVECTOR_SHUFFLEv8i8 (SDValue Op, ArrayRef< int > ShuffleMask, SelectionDAG &DAG)
static SDValue LowerReverse_VECTOR_SHUFFLE (SDValue Op, SelectionDAG &DAG)
static EVT getVectorTyFromPredicateVector (EVT VT)
static SDValue PromoteMVEPredVector (SDLoc dl, SDValue Pred, EVT VT, SelectionDAG &DAG)
static SDValue LowerVECTOR_SHUFFLE_i1 (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerVECTOR_SHUFFLEUsingMovs (SDValue Op, ArrayRef< int > ShuffleMask, SelectionDAG &DAG)
static SDValue LowerVECTOR_SHUFFLEUsingOneOff (SDValue Op, ArrayRef< int > ShuffleMask, SelectionDAG &DAG)
static SDValue LowerVECTOR_SHUFFLE (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerINSERT_VECTOR_ELT_i1 (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerEXTRACT_VECTOR_ELT_i1 (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerEXTRACT_VECTOR_ELT (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerCONCAT_VECTORS_i1 (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerCONCAT_VECTORS (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerEXTRACT_SUBVECTOR (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerTruncatei1 (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerTruncate (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue LowerVectorExtend (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static bool isExtendedBUILD_VECTOR (SDNode *N, SelectionDAG &DAG, bool isSigned)
 isExtendedBUILD_VECTOR - Check if N is a constant BUILD_VECTOR where each element has been zero/sign-extended, depending on the isSigned parameter, from an integer type half its size.
static bool isSignExtended (SDNode *N, SelectionDAG &DAG)
 isSignExtended - Check if a node is a vector value that is sign-extended or a constant BUILD_VECTOR with sign-extended elements.
static bool isZeroExtended (SDNode *N, SelectionDAG &DAG)
 isZeroExtended - Check if a node is a vector value that is zero-extended (or any-extended) or a constant BUILD_VECTOR with zero-extended elements.
static EVT getExtensionTo64Bits (const EVT &OrigVT)
static SDValue AddRequiredExtensionForVMULL (SDValue N, SelectionDAG &DAG, const EVT &OrigTy, const EVT &ExtTy, unsigned ExtOpcode)
 AddRequiredExtensionForVMULL - Add a sign/zero extension to extend the total value size to 64 bits.
static SDValue SkipLoadExtensionForVMULL (LoadSDNode *LD, SelectionDAG &DAG)
 SkipLoadExtensionForVMULL - return a load of the original vector size that does not do any sign/zero extension.
static SDValue SkipExtensionForVMULL (SDNode *N, SelectionDAG &DAG)
 SkipExtensionForVMULL - For a node that is a SIGN_EXTEND, ZERO_EXTEND, ANY_EXTEND, extending load, or BUILD_VECTOR with extended elements, return the unextended value.
static bool isAddSubSExt (SDNode *N, SelectionDAG &DAG)
static bool isAddSubZExt (SDNode *N, SelectionDAG &DAG)
static SDValue LowerMUL (SDValue Op, SelectionDAG &DAG)
static SDValue LowerSDIV_v4i8 (SDValue X, SDValue Y, const SDLoc &dl, SelectionDAG &DAG)
static SDValue LowerSDIV_v4i16 (SDValue N0, SDValue N1, const SDLoc &dl, SelectionDAG &DAG)
static SDValue LowerSDIV (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerUDIV (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerUADDSUBO_CARRY (SDValue Op, SelectionDAG &DAG)
static SDValue WinDBZCheckDenominator (SelectionDAG &DAG, SDNode *N, SDValue InChain)
static SDValue LowerPredicateLoad (SDValue Op, SelectionDAG &DAG)
static SDValue LowerPredicateStore (SDValue Op, SelectionDAG &DAG)
static SDValue LowerSTORE (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static bool isZeroVector (SDValue N)
static SDValue LowerMLOAD (SDValue Op, SelectionDAG &DAG)
static SDValue LowerVecReduce (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerVecReduceF (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerVecReduceMinMax (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue LowerAtomicLoadStore (SDValue Op, SelectionDAG &DAG)
static void ReplaceREADCYCLECOUNTER (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue createGPRPairNode2xi32 (SelectionDAG &DAG, SDValue V0, SDValue V1)
static SDValue createGPRPairNodei64 (SelectionDAG &DAG, SDValue V)
static void ReplaceCMP_SWAP_64Results (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG)
static void ReplaceLongIntrinsic (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG)
static MachineBasicBlockOtherSucc (MachineBasicBlock *MBB, MachineBasicBlock *Succ)
static unsigned getLdOpcode (unsigned LdSize, bool IsThumb1, bool IsThumb2)
 Return the load opcode for a given load size.
static unsigned getStOpcode (unsigned StSize, bool IsThumb1, bool IsThumb2)
 Return the store opcode for a given store size.
static void emitPostLd (MachineBasicBlock *BB, MachineBasicBlock::iterator Pos, const TargetInstrInfo *TII, const DebugLoc &dl, unsigned LdSize, unsigned Data, unsigned AddrIn, unsigned AddrOut, bool IsThumb1, bool IsThumb2)
 Emit a post-increment load operation with given size.
static void emitPostSt (MachineBasicBlock *BB, MachineBasicBlock::iterator Pos, const TargetInstrInfo *TII, const DebugLoc &dl, unsigned StSize, unsigned Data, unsigned AddrIn, unsigned AddrOut, bool IsThumb1, bool IsThumb2)
 Emit a post-increment store operation with given size.
static bool checkAndUpdateCPSRKill (MachineBasicBlock::iterator SelectItr, MachineBasicBlock *BB, const TargetRegisterInfo *TRI)
static Register genTPEntry (MachineBasicBlock *TpEntry, MachineBasicBlock *TpLoopBody, MachineBasicBlock *TpExit, Register OpSizeReg, const TargetInstrInfo *TII, DebugLoc Dl, MachineRegisterInfo &MRI)
 Adds logic in loop entry MBB to calculate loop iteration count and adds t2WhileLoopSetup and t2WhileLoopStart to generate WLS loop.
static void genTPLoopBody (MachineBasicBlock *TpLoopBody, MachineBasicBlock *TpEntry, MachineBasicBlock *TpExit, const TargetInstrInfo *TII, DebugLoc Dl, MachineRegisterInfo &MRI, Register OpSrcReg, Register OpDestReg, Register ElementCountReg, Register TotalIterationsReg, bool IsMemcpy)
 Adds logic in the loopBody MBB to generate MVE_VCTP, t2DoLoopDec and t2DoLoopEnd.
static void attachMEMCPYScratchRegs (const ARMSubtarget *Subtarget, MachineInstr &MI, const SDNode *Node)
 Attaches vregs to MEMCPY that it will use as scratch registers when it is expanded into LDM/STM.
static bool isZeroOrAllOnes (SDValue N, bool AllOnes)
static bool isConditionalZeroOrAllOnes (SDNode *N, bool AllOnes, SDValue &CC, bool &Invert, SDValue &OtherOp, SelectionDAG &DAG)
static SDValue combineSelectAndUse (SDNode *N, SDValue Slct, SDValue OtherOp, TargetLowering::DAGCombinerInfo &DCI, bool AllOnes=false)
static SDValue combineSelectAndUseCommutative (SDNode *N, bool AllOnes, TargetLowering::DAGCombinerInfo &DCI)
static bool IsVUZPShuffleNode (SDNode *N)
static SDValue AddCombineToVPADD (SDNode *N, SDValue N0, SDValue N1, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue AddCombineVUZPToVPADDL (SDNode *N, SDValue N0, SDValue N1, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue AddCombineBUILD_VECTORToVPADDL (SDNode *N, SDValue N0, SDValue N1, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue findMUL_LOHI (SDValue V)
static SDValue AddCombineTo64BitSMLAL16 (SDNode *AddcNode, SDNode *AddeNode, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue AddCombineTo64bitMLAL (SDNode *AddeSubeNode, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue AddCombineTo64bitUMAAL (SDNode *AddeNode, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue PerformUMLALCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue PerformAddcSubcCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue PerformAddeSubeCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue PerformSELECTCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue PerformVQDMULHCombine (SDNode *N, SelectionDAG &DAG)
static SDValue PerformVSELECTCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue PerformVSetCCToVCTPCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue PerformADDECombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
 PerformADDECombine - Target-specific dag combine transform from ARMISD::ADDC, ARMISD::ADDE, and ISD::MUL_LOHI to MLAL or ARMISD::ADDC, ARMISD::ADDE and ARMISD::UMLAL to ARMISD::UMAAL.
static SDValue PerformADDCombineWithOperands (SDNode *N, SDValue N0, SDValue N1, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
 PerformADDCombineWithOperands - Try DAG combinations for an ADD with operands N0 and N1.
static SDValue TryDistrubutionADDVecReduce (SDNode *N, SelectionDAG &DAG)
static SDValue PerformADDVecReduce (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue PerformSHLSimplify (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *ST)
static SDValue PerformADDCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
 PerformADDCombine - Target-specific dag combine xforms for ISD::ADD.
static SDValue PerformSubCSINCCombine (SDNode *N, SelectionDAG &DAG)
static SDValue PerformSUBCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
 PerformSUBCombine - Target-specific dag combine xforms for ISD::SUB.
static SDValue PerformVMULCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
 PerformVMULCombine Distribute (A + B) * C to (A * C) + (B * C) to take advantage of the special multiplier accumulator forwarding.
static SDValue PerformMVEVMULLCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue PerformMULCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue CombineANDShift (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue PerformANDCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue PerformORCombineToSMULWBT (SDNode *OR, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue PerformORCombineToBFI (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static bool isValidMVECond (unsigned CC, bool IsFloat)
static ARMCC::CondCodes getVCMPCondCode (SDValue N)
static bool CanInvertMVEVCMP (SDValue N)
static SDValue PerformORCombine_i1 (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue PerformORCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
 PerformORCombine - Target-specific dag combine xforms for ISD::OR.
static SDValue PerformXORCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue ParseBFI (SDNode *N, APInt &ToMask, APInt &FromMask)
static bool BitsProperlyConcatenate (const APInt &A, const APInt &B)
static SDValue FindBFIToCombineWith (SDNode *N)
static SDValue PerformBFICombine (SDNode *N, SelectionDAG &DAG)
static SDValue IsCMPZCSINC (SDNode *Cmp, ARMCC::CondCodes &CC)
static SDValue PerformCMPZCombine (SDNode *N, SelectionDAG &DAG)
static SDValue PerformCSETCombine (SDNode *N, SelectionDAG &DAG)
static SDValue PerformVMOVRRDCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
 PerformVMOVRRDCombine - Target-specific dag combine xforms for ARMISD::VMOVRRD.
static SDValue PerformVMOVDRRCombine (SDNode *N, SelectionDAG &DAG)
 PerformVMOVDRRCombine - Target-specific dag combine xforms for ARMISD::VMOVDRR.
static SDValue PerformVMOVhrCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
static SDValue PerformVMOVrhCombine (SDNode *N, SelectionDAG &DAG)
static bool hasNormalLoadOperand (SDNode *N)
 hasNormalLoadOperand - Check if any of the operands of a BUILD_VECTOR node are normal, non-volatile loads.
static SDValue PerformBUILD_VECTORCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
 PerformBUILD_VECTORCombine - Target-specific dag combine xforms for ISD::BUILD_VECTOR.
static SDValue PerformARMBUILD_VECTORCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
 Target-specific dag combine xforms for ARMISD::BUILD_VECTOR.
static SDValue PerformPREDICATE_CASTCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
static SDValue PerformVECTOR_REG_CASTCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue PerformVCMPCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue PerformInsertEltCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
 PerformInsertEltCombine - Target-specific dag combine xforms for ISD::INSERT_VECTOR_ELT.
static SDValue PerformExtractEltToVMOVRRD (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
static SDValue PerformExtractEltCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *ST)
static SDValue PerformSignExtendInregCombine (SDNode *N, SelectionDAG &DAG)
static SDValue PerformInsertSubvectorCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
static SDValue PerformShuffleVMOVNCombine (ShuffleVectorSDNode *N, SelectionDAG &DAG)
static SDValue PerformVECTOR_SHUFFLECombine (SDNode *N, SelectionDAG &DAG)
 PerformVECTOR_SHUFFLECombine - Target-specific dag combine xforms for ISD::VECTOR_SHUFFLE.
static bool isValidBaseUpdate (SDNode *N, SDNode *User)
static bool TryCombineBaseUpdate (struct BaseUpdateTarget &Target, struct BaseUpdateUser &User, bool SimpleConstIncOnly, TargetLowering::DAGCombinerInfo &DCI)
static unsigned getPointerConstIncrement (unsigned Opcode, SDValue Ptr, SDValue Inc, const SelectionDAG &DAG)
static bool findPointerConstIncrement (SDNode *N, SDValue *Ptr, SDValue *CInc)
static SDValue CombineBaseUpdate (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
 CombineBaseUpdate - Target-specific DAG combine function for VLDDUP, NEON load/store intrinsics, and generic vector load/stores, to merge base address updates.
static SDValue PerformVLDCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
static SDValue PerformMVEVLDCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
static bool CombineVLDDUP (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
 CombineVLDDUP - For a VDUPLANE node N, check if its source operand is a vldN-lane (N > 1) intrinsic, and if all the other uses of that intrinsic are also VDUPLANEs.
static SDValue PerformVDUPLANECombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
 PerformVDUPLANECombine - Target-specific dag combine xforms for ARMISD::VDUPLANE.
static SDValue PerformVDUPCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
 PerformVDUPCombine - Target-specific dag combine xforms for ARMISD::VDUP.
static SDValue PerformLOADCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
static SDValue PerformTruncatingStoreCombine (StoreSDNode *St, SelectionDAG &DAG)
static SDValue PerformSplittingToNarrowingStores (StoreSDNode *St, SelectionDAG &DAG)
static SDValue PerformSplittingMVETruncToNarrowingStores (StoreSDNode *St, SelectionDAG &DAG)
static SDValue PerformExtractFpToIntStores (StoreSDNode *St, SelectionDAG &DAG)
static SDValue PerformSTORECombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *Subtarget)
 PerformSTORECombine - Target-specific dag combine xforms for ISD::STORE.
static SDValue PerformVCVTCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
 PerformVCVTCombine - VCVT (floating-point to fixed-point, Advanced SIMD) can replace combinations of VMUL and VCVT (floating-point to integer) when the VMUL has a constant operand that is a power of 2.
static SDValue PerformFAddVSelectCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue PerformFADDVCMLACombine (SDNode *N, SelectionDAG &DAG)
static SDValue PerformFADDCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue PerformVMulVCTPCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
 PerformVMulVCTPCombine - VCVT (fixed-point to floating-point, Advanced SIMD) can replace combinations of VCVT (integer to floating-point) and VMUL when the VMUL has a constant operand that is a power of 2.
static SDValue PerformVECREDUCE_ADDCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue PerformReduceShuffleCombine (SDNode *N, SelectionDAG &DAG)
static SDValue PerformVMOVNCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
static SDValue PerformVQMOVNCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
static SDValue PerformVQDMULHCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
static SDValue PerformLongShiftCombine (SDNode *N, SelectionDAG &DAG)
static SDValue PerformShiftCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *ST)
 PerformShiftCombine - Checks for immediate versions of vector shifts and lowers them.
static SDValue PerformSplittingToWideningLoad (SDNode *N, SelectionDAG &DAG)
static SDValue PerformExtendCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *ST)
 PerformExtendCombine - Target-specific DAG combining for ISD::SIGN_EXTEND, ISD::ZERO_EXTEND, and ISD::ANY_EXTEND.
static SDValue PerformFPExtendCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *ST)
static SDValue PerformMinMaxToSatCombine (SDValue Op, SelectionDAG &DAG, const ARMSubtarget *Subtarget)
static SDValue PerformMinMaxCombine (SDNode *N, SelectionDAG &DAG, const ARMSubtarget *ST)
 PerformMinMaxCombine - Target-specific DAG combining for creating truncating saturates.
static const APIntisPowerOf2Constant (SDValue V)
static SDValue SearchLoopIntrinsic (SDValue N, ISD::CondCode &CC, int &Imm, bool &Negate)
static SDValue PerformHWLoopCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *ST)
static SDValue PerformBITCASTCombine (SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const ARMSubtarget *ST)
static SDValue PerformSplittingMVEEXTToWideningLoad (SDNode *N, SelectionDAG &DAG)
static bool isLegalT1AddressImmediate (int64_t V, EVT VT)
static bool isLegalT2AddressImmediate (int64_t V, EVT VT, const ARMSubtarget *Subtarget)
static bool isLegalAddressImmediate (int64_t V, EVT VT, const ARMSubtarget *Subtarget)
 isLegalAddressImmediate - Return true if the integer value can be used as the offset of the target addressing mode for load / store of the given type.
static bool getARMIndexedAddressParts (SDNode *Ptr, EVT VT, bool isSEXTLoad, SDValue &Base, SDValue &Offset, bool &isInc, SelectionDAG &DAG)
static bool getT2IndexedAddressParts (SDNode *Ptr, EVT VT, bool isSEXTLoad, SDValue &Base, SDValue &Offset, bool &isInc, SelectionDAG &DAG)
static bool getMVEIndexedAddressParts (SDNode *Ptr, EVT VT, Align Alignment, bool isSEXTLoad, bool IsMasked, bool isLE, SDValue &Base, SDValue &Offset, bool &isInc, SelectionDAG &DAG)
static bool isIncompatibleReg (const MCPhysReg &PR, MVT VT)
static RTLIB::Libcall getDivRemLibcall (const SDNode *N, MVT::SimpleValueType SVT)
static TargetLowering::ArgListTy getDivRemArgList (const SDNode *N, LLVMContext *Context, const ARMSubtarget *Subtarget)
static bool isHomogeneousAggregate (Type *Ty, HABaseType &Base, uint64_t &Members)

Variables

static cl::opt< boolARMInterworking ("arm-interworking", cl::Hidden, cl::desc("Enable / disable ARM interworking (for debugging only)"), cl::init(true))
static cl::opt< boolEnableConstpoolPromotion ("arm-promote-constant", cl::Hidden, cl::desc("Enable / disable promotion of unnamed_addr constants into " "constant pools"), cl::init(false))
static cl::opt< unsignedConstpoolPromotionMaxSize ("arm-promote-constant-max-size", cl::Hidden, cl::desc("Maximum size of constant to promote into a constant pool"), cl::init(64))
static cl::opt< unsignedConstpoolPromotionMaxTotal ("arm-promote-constant-max-total", cl::Hidden, cl::desc("Maximum size of ALL constants to promote into a constant pool"), cl::init(128))
cl::opt< unsignedMVEMaxSupportedInterleaveFactor ("mve-max-interleave-factor", cl::Hidden, cl::desc("Maximum interleave factor for MVE VLDn to generate."), cl::init(2))
cl::opt< unsignedArmMaxBaseUpdatesToCheck ("arm-max-base-updates-to-check", cl::Hidden, cl::desc("Maximum number of base-updates to check generating postindex."), cl::init(64))
constexpr MVT FlagsVT = MVT::i32
 Value type used for "flags" operands / results (either CPSR or FPSCR_NZCV).
static const MCPhysReg GPRArgRegs []

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "arm-isel"

Definition at line 119 of file ARMISelLowering.cpp.

◆ MAKE_CASE

#define MAKE_CASE ( V)
Value:
case V: \
return #V;

Typedef Documentation

◆ RCPair

using RCPair = std::pair<unsigned, const TargetRegisterClass *>

Definition at line 20312 of file ARMISelLowering.cpp.

Enumeration Type Documentation

◆ HABaseType

enum HABaseType
Enumerator
HA_UNKNOWN 
HA_FLOAT 
HA_DOUBLE 
HA_VECT64 
HA_VECT128 

Definition at line 21842 of file ARMISelLowering.cpp.

◆ ShuffleOpCodes

Enumerator
OP_COPY 
OP_VREV 
OP_VDUP0 
OP_VDUP1 
OP_VDUP2 
OP_VDUP3 
OP_VEXT1 
OP_VEXT2 
OP_VEXT3 
OP_VUZPL 
OP_VUZPR 
OP_VZIPL 
OP_VZIPR 
OP_VTRNL 
OP_VTRNR 

Definition at line 8275 of file ARMISelLowering.cpp.

Function Documentation

◆ AddCombineBUILD_VECTORToVPADDL()

◆ AddCombineTo64bitMLAL()

◆ AddCombineTo64BitSMLAL16()

◆ AddCombineTo64bitUMAAL()

◆ AddCombineToVPADD()

◆ AddCombineVUZPToVPADDL()

◆ AddRequiredExtensionForVMULL()

SDValue AddRequiredExtensionForVMULL ( SDValue N,
SelectionDAG & DAG,
const EVT & OrigTy,
const EVT & ExtTy,
unsigned ExtOpcode )
static

AddRequiredExtensionForVMULL - Add a sign/zero extension to extend the total value size to 64 bits.

We need a 64-bit D register as an operand to VMULL. We insert the required extension here to get the vector to fill a D register.

Definition at line 9396 of file ARMISelLowering.cpp.

References assert(), getExtensionTo64Bits(), llvm::SelectionDAG::getNode(), llvm::EVT::getSizeInBits(), llvm::EVT::is128BitVector(), and N.

Referenced by SkipExtensionForVMULL().

◆ allUsersAreInFunction()

bool allUsersAreInFunction ( const Value * V,
const Function * F )
static

Return true if all users of V are within function F, looking through ConstantExprs.

Definition at line 3716 of file ARMISelLowering.cpp.

References llvm::append_range(), llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), F, I, llvm::isa(), and llvm::SmallVectorImpl< T >::pop_back_val().

Referenced by promoteToConstantPool().

◆ attachMEMCPYScratchRegs()

void attachMEMCPYScratchRegs ( const ARMSubtarget * Subtarget,
MachineInstr & MI,
const SDNode * Node )
static

Attaches vregs to MEMCPY that it will use as scratch registers when it is expanded into LDM/STM.

This is done as a post-isel lowering instead of as a custom inserter because we need the use list from the SDNode.

Definition at line 12387 of file ARMISelLowering.cpp.

References llvm::MachineInstrBuilder::addReg(), llvm::RegState::Dead, llvm::RegState::Define, llvm::getImm(), llvm::MachineFunction::getRegInfo(), I, llvm::ARMSubtarget::isThumb1Only(), MI, and MRI.

Referenced by llvm::ARMTargetLowering::AdjustInstrPostInstrSelection().

◆ bitcastf32Toi32()

◆ BitsProperlyConcatenate()

bool BitsProperlyConcatenate ( const APInt & A,
const APInt & B )
static

Definition at line 14895 of file ARMISelLowering.cpp.

References A(), and B().

Referenced by FindBFIToCombineWith().

◆ canChangeToInt()

bool canChangeToInt ( SDValue Op,
bool & SeenZero,
const ARMSubtarget * Subtarget )
static

canChangeToInt - Given the fp compare operand, return true if it is suitable to morph to an integer compare sequence.

Definition at line 5511 of file ARMISelLowering.cpp.

References isFloatingPointZero(), llvm::ISD::isNormalLoad(), and N.

◆ canGuaranteeTCO()

bool canGuaranteeTCO ( CallingConv::ID CC,
bool GuaranteeTailCalls )
static

◆ CanInvertMVEVCMP()

bool CanInvertMVEVCMP ( SDValue N)
static

◆ checkAndUpdateCPSRKill()

◆ checkVSELConstraints()

◆ CombineANDShift()

◆ CombineBaseUpdate()

◆ combineSelectAndUse()

◆ combineSelectAndUseCommutative()

◆ CombineVLDDUP()

◆ CombineVMOVDRRCandidateWithVecOp()

SDValue CombineVMOVDRRCandidateWithVecOp ( const SDNode * BC,
SelectionDAG & DAG )
static

BC is a bitcast that is about to be turned into a VMOVDRR.

When DstVT, the destination type of BC, is on the vector register bank and the source of bitcast, Op, operates on the same bank, it might be possible to combine them, such that everything stays on the vector register bank. return The node that would replace BT, if the combine is possible.

Definition at line 6103 of file ARMISelLowering.cpp.

References llvm::dyn_cast(), llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::APInt::getBitWidth(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getNode(), llvm::SDNode::getOperand(), llvm::EVT::getScalarType(), llvm::SDNode::getValueType(), llvm::SDValue::getValueType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::APInt::getZExtValue(), llvm::EVT::isVector(), and SDValue().

◆ ConvertBooleanCarryToCarryFlag()

◆ ConvertCarryFlagToBooleanCarry()

SDValue ConvertCarryFlagToBooleanCarry ( SDValue Flags,
EVT VT,
SelectionDAG & DAG )
static

◆ createGPRPairNode2xi32()

◆ createGPRPairNodei64()

◆ emitPostLd()

void emitPostLd ( MachineBasicBlock * BB,
MachineBasicBlock::iterator Pos,
const TargetInstrInfo * TII,
const DebugLoc & dl,
unsigned LdSize,
unsigned Data,
unsigned AddrIn,
unsigned AddrOut,
bool IsThumb1,
bool IsThumb2 )
static

Emit a post-increment load operation with given size.

The instructions will be added to BB at Pos.

Definition at line 11386 of file ARMISelLowering.cpp.

References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, assert(), llvm::BuildMI(), llvm::Data, llvm::RegState::Define, getLdOpcode(), llvm::predOps(), llvm::t1CondCodeOp(), and TII.

◆ emitPostSt()

void emitPostSt ( MachineBasicBlock * BB,
MachineBasicBlock::iterator Pos,
const TargetInstrInfo * TII,
const DebugLoc & dl,
unsigned StSize,
unsigned Data,
unsigned AddrIn,
unsigned AddrOut,
bool IsThumb1,
bool IsThumb2 )
static

Emit a post-increment store operation with given size.

The instructions will be added to BB at Pos.

Definition at line 11427 of file ARMISelLowering.cpp.

References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, assert(), llvm::BuildMI(), llvm::Data, getStOpcode(), llvm::predOps(), llvm::t1CondCodeOp(), and TII.

◆ Expand64BitShift()

◆ expandf64Toi32()

◆ ExpandREAD_REGISTER()

◆ FindBFIToCombineWith()

SDValue FindBFIToCombineWith ( SDNode * N)
static

Definition at line 14901 of file ARMISelLowering.cpp.

References llvm::ARMISD::BFI, BitsProperlyConcatenate(), N, ParseBFI(), and SDValue().

Referenced by PerformBFICombine().

◆ findMUL_LOHI()

SDValue findMUL_LOHI ( SDValue V)
static

Definition at line 12832 of file ARMISelLowering.cpp.

References SDValue(), llvm::ISD::SMUL_LOHI, and llvm::ISD::UMUL_LOHI.

Referenced by AddCombineTo64bitMLAL().

◆ findPointerConstIncrement()

bool findPointerConstIncrement ( SDNode * N,
SDValue * Ptr,
SDValue * CInc )
static

Definition at line 16155 of file ARMISelLowering.cpp.

References llvm::ISD::ADD, llvm::isa(), N, llvm::ISD::OR, Ptr, and llvm::ARMISD::VLD1_UPD.

Referenced by CombineBaseUpdate().

◆ FPCCToARMCC()

◆ GeneratePerfectShuffle()

◆ genTPEntry()

Register genTPEntry ( MachineBasicBlock * TpEntry,
MachineBasicBlock * TpLoopBody,
MachineBasicBlock * TpExit,
Register OpSizeReg,
const TargetInstrInfo * TII,
DebugLoc Dl,
MachineRegisterInfo & MRI )
static

Adds logic in loop entry MBB to calculate loop iteration count and adds t2WhileLoopSetup and t2WhileLoopStart to generate WLS loop.

Definition at line 11852 of file ARMISelLowering.cpp.

References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstrBuilder::addUse(), llvm::ARMCC::AL, llvm::BuildMI(), llvm::RegState::Kill, MRI, llvm::predOps(), and TII.

Referenced by llvm::ARMTargetLowering::EmitInstrWithCustomInserter().

◆ genTPLoopBody()

void genTPLoopBody ( MachineBasicBlock * TpLoopBody,
MachineBasicBlock * TpEntry,
MachineBasicBlock * TpExit,
const TargetInstrInfo * TII,
DebugLoc Dl,
MachineRegisterInfo & MRI,
Register OpSrcReg,
Register OpDestReg,
Register ElementCountReg,
Register TotalIterationsReg,
bool IsMemcpy )
static

◆ getARMIndexedAddressParts()

◆ getDivRemArgList()

TargetLowering::ArgListTy getDivRemArgList ( const SDNode * N,
LLVMContext * Context,
const ARMSubtarget * Subtarget )
static

◆ getDivRemLibcall()

RTLIB::Libcall getDivRemLibcall ( const SDNode * N,
MVT::SimpleValueType SVT )
static

◆ getExtensionTo64Bits()

◆ getLdOpcode()

unsigned getLdOpcode ( unsigned LdSize,
bool IsThumb1,
bool IsThumb2 )
static

Return the load opcode for a given load size.

If load size >= 8, neon opcode will be returned.

Definition at line 11348 of file ARMISelLowering.cpp.

Referenced by emitPostLd().

◆ getMVEIndexedAddressParts()

bool getMVEIndexedAddressParts ( SDNode * Ptr,
EVT VT,
Align Alignment,
bool isSEXTLoad,
bool IsMasked,
bool isLE,
SDValue & Base,
SDValue & Offset,
bool & isInc,
SelectionDAG & DAG )
static

◆ getPointerConstIncrement()

◆ getStOpcode()

unsigned getStOpcode ( unsigned StSize,
bool IsThumb1,
bool IsThumb2 )
static

Return the store opcode for a given store size.

If store size >= 8, neon opcode will be returned.

Definition at line 11367 of file ARMISelLowering.cpp.

Referenced by emitPostSt().

◆ getT2IndexedAddressParts()

◆ getVCMPCondCode()

ARMCC::CondCodes getVCMPCondCode ( SDValue N)
static

◆ getVectorTyFromPredicateVector()

◆ getVShiftImm()

bool getVShiftImm ( SDValue Op,
unsigned ElementBits,
int64_t & Cnt )
static

Getvshiftimm - Check if this is a valid build_vector for the immediate operand of a vector shift operation, where all the elements of the build_vector must have the same constant integer value.

Definition at line 6512 of file ARMISelLowering.cpp.

References llvm::dyn_cast(), llvm::APInt::getSExtValue(), and llvm::BuildVectorSDNode::isConstantSplat().

◆ getZeroVector()

SDValue getZeroVector ( EVT VT,
SelectionDAG & DAG,
const SDLoc & dl )
static

getZeroVector - Returns a vector of specified type with all zero elements.

Zero vectors are used to represent vector negation and in those cases will be implemented with the NEON VNEG instruction. However, VNEG does not support i64 elements, so sometimes the zero vectors will need to be explicitly constructed. Regardless, use a canonical VMOV to create the zero vector.

Definition at line 6214 of file ARMISelLowering.cpp.

References assert(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getTargetConstant(), llvm::EVT::is128BitVector(), llvm::EVT::isVector(), and llvm::ARMISD::VMOVIMM.

Referenced by canonicalizeShuffleMaskWithHorizOp(), combineAdd(), combineAnd(), combineAndnp(), combineArithReduction(), combineConcatVectorOps(), combineEXTRACT_SUBVECTOR(), combineINSERT_SUBVECTOR(), combineTargetShuffle(), combineX86ShuffleChain(), combineX86ShufflesConstants(), combineX86ShufflesRecursively(), createVariablePermute(), getAVX2GatherNode(), getGatherNode(), getNullFPConstForNullVal(), getScalarMaskingNode(), getShuffleVectorZeroOrUndef(), getVectorMaskingNode(), LowerAVXCONCAT_VECTORS(), LowerBuildVectorAsInsert(), LowerBuildVectorv16i8(), LowerBuildVectorv4x32(), LowerCTTZ(), LowerMGATHER(), LowerMLOAD(), LowerSCALAR_TO_VECTOR(), LowerShift(), lowerShuffleAsBlend(), lowerShuffleAsSpecificExtension(), lowerShuffleAsVALIGN(), lowerShuffleWithEXPAND(), lowerShuffleWithSHUFPD(), lowerV16I8Shuffle(), lowerV2X128Shuffle(), lowerV4X128Shuffle(), lowerV8I16Shuffle(), lowerVECTOR_SHUFFLE(), matchBinaryPermuteShuffle(), matchShuffleWithUNPCK(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetNode(), llvm::X86TargetLowering::SimplifyMultipleUseDemandedBitsForTargetNode(), and widenSubVector().

◆ handleCMSEValue()

◆ hasNormalLoadOperand()

bool hasNormalLoadOperand ( SDNode * N)
static

hasNormalLoadOperand - Check if any of the operands of a BUILD_VECTOR node are normal, non-volatile loads.

If so, it is profitable to bitcast an i64 vector to have f64 elements, since the value can then be loaded directly into a VFP register.

Definition at line 15280 of file ARMISelLowering.cpp.

References llvm::cast(), llvm::ISD::isNormalLoad(), and N.

Referenced by PerformBUILD_VECTORCombine().

◆ IntCCToARMCC()

◆ isAddSubSExt()

bool isAddSubSExt ( SDNode * N,
SelectionDAG & DAG )
static

◆ isAddSubZExt()

bool isAddSubZExt ( SDNode * N,
SelectionDAG & DAG )
static

◆ IsCMPZCSINC()

◆ isConditionalZeroOrAllOnes()

◆ isExtendedBUILD_VECTOR()

bool isExtendedBUILD_VECTOR ( SDNode * N,
SelectionDAG & DAG,
bool isSigned )
static

isExtendedBUILD_VECTOR - Check if N is a constant BUILD_VECTOR where each element has been zero/sign-extended, depending on the isSigned parameter, from an integer type half its size.

Definition at line 9304 of file ARMISelLowering.cpp.

References llvm::ISD::BUILD_VECTOR, llvm::CallingConv::C, llvm::dyn_cast(), llvm::SelectionDAG::getDataLayout(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::EVT::getScalarSizeInBits(), llvm::ConstantSDNode::getSExtValue(), llvm::SDNode::getValueType(), llvm::DataLayout::isBigEndian(), llvm::isIntN(), isSigned(), llvm::isUIntN(), llvm::ConstantSDNode::isZero(), and N.

◆ isFloatingPointZero()

◆ isGTorGE()

bool isGTorGE ( ISD::CondCode CC)
static

Definition at line 5177 of file ARMISelLowering.cpp.

References llvm::ISD::SETGE, and llvm::ISD::SETGT.

Referenced by isLowerSaturate(), and LowerSaturatingConditional().

◆ isHomogeneousAggregate()

◆ isIncompatibleReg()

bool isIncompatibleReg ( const MCPhysReg & PR,
MVT VT )
static

◆ isLegalAddressImmediate()

bool isLegalAddressImmediate ( int64_t V,
EVT VT,
const ARMSubtarget * Subtarget )
static

isLegalAddressImmediate - Return true if the integer value can be used as the offset of the target addressing mode for load / store of the given type.

Definition at line 19458 of file ARMISelLowering.cpp.

References llvm::EVT::getSimpleVT(), llvm::ARMSubtarget::hasVFP2Base(), isLegalT1AddressImmediate(), isLegalT2AddressImmediate(), llvm::isShiftedUInt(), llvm::EVT::isSimple(), llvm::ARMSubtarget::isThumb1Only(), llvm::ARMSubtarget::isThumb2(), llvm::isUInt(), and llvm::MVT::SimpleTy.

Referenced by llvm::ARMTargetLowering::isLegalAddressingMode().

◆ isLegalMVEShuffleOp()

bool isLegalMVEShuffleOp ( unsigned PFEntry)
static

◆ isLegalT1AddressImmediate()

bool isLegalT1AddressImmediate ( int64_t V,
EVT VT )
static

◆ isLegalT2AddressImmediate()

◆ isLowerSaturate()

bool isLowerSaturate ( const SDValue LHS,
const SDValue RHS,
const SDValue TrueVal,
const SDValue FalseVal,
const ISD::CondCode CC,
const SDValue K )
static

Definition at line 5191 of file ARMISelLowering.cpp.

References isGTorGE(), isLTorLE(), LHS, and RHS.

Referenced by isLowerSaturatingConditional().

◆ isLowerSaturatingConditional()

bool isLowerSaturatingConditional ( const SDValue & Op,
SDValue & V,
SDValue & SatK )
static

Definition at line 5283 of file ARMISelLowering.cpp.

References llvm::cast(), llvm::isa(), isLowerSaturate(), LHS, and RHS.

◆ isLTorLE()

bool isLTorLE ( ISD::CondCode CC)
static

Definition at line 5181 of file ARMISelLowering.cpp.

References llvm::ISD::SETLE, and llvm::ISD::SETLT.

Referenced by isLowerSaturate(), and LowerSaturatingConditional().

◆ isNEONTwoResultShuffleMask()

unsigned isNEONTwoResultShuffleMask ( ArrayRef< int > ShuffleMask,
EVT VT,
unsigned & WhichResult,
bool & isV_UNDEF )
static

Check if ShuffleMask is a NEON two-result shuffle (VZIP, VUZP, VTRN), and return the corresponding ARMISD opcode if it is, or 0 if it isn't.

Definition at line 7442 of file ARMISelLowering.cpp.

References isVTRN_v_undef_Mask(), isVTRNMask(), isVUZP_v_undef_Mask(), isVUZPMask(), isVZIP_v_undef_Mask(), isVZIPMask(), llvm::ARMISD::VTRN, llvm::ARMISD::VUZP, and llvm::ARMISD::VZIP.

Referenced by llvm::ARMTargetLowering::isShuffleMaskLegal(), and LowerVECTOR_SHUFFLE().

◆ isPowerOf2Constant()

◆ IsQRMVEInstruction()

◆ isReverseMask()

bool isReverseMask ( ArrayRef< int > M,
EVT VT )
static

◆ isS16()

bool isS16 ( const SDValue & Op,
SelectionDAG & DAG )
static

◆ isSHL16()

bool isSHL16 ( const SDValue & Op)
static

Definition at line 1859 of file ARMISelLowering.cpp.

References llvm::dyn_cast(), and llvm::ISD::SHL.

Referenced by isS16(), and PerformORCombineToSMULWBT().

◆ isSignExtended()

bool isSignExtended ( SDNode * N,
SelectionDAG & DAG )
static

isSignExtended - Check if a node is a vector value that is sign-extended or a constant BUILD_VECTOR with sign-extended elements.

Definition at line 9357 of file ARMISelLowering.cpp.

References isExtendedBUILD_VECTOR(), llvm::ISD::isSEXTLoad(), N, and llvm::ISD::SIGN_EXTEND.

◆ IsSingleInstrConstant()

SDValue IsSingleInstrConstant ( SDValue N,
SelectionDAG & DAG,
const ARMSubtarget * ST,
const SDLoc & dl )
static

◆ isSingletonVEXTMask()

bool isSingletonVEXTMask ( ArrayRef< int > M,
EVT VT,
unsigned & Imm )
static

Definition at line 7143 of file ARMISelLowering.cpp.

References llvm::EVT::getVectorNumElements().

Referenced by LowerVECTOR_SHUFFLE().

◆ isSRA16()

bool isSRA16 ( const SDValue & Op)
static

◆ isSRL16()

bool isSRL16 ( const SDValue & Op)
static

Definition at line 1843 of file ARMISelLowering.cpp.

References llvm::dyn_cast(), and llvm::ISD::SRL.

Referenced by PerformORCombineToSMULWBT().

◆ isTruncMask()

bool isTruncMask ( ArrayRef< int > M,
EVT VT,
bool Top,
bool SingleSource )
static

◆ isValidBaseUpdate()

bool isValidBaseUpdate ( SDNode * N,
SDNode * User )
static

◆ isValidMVECond()

◆ isVEXTMask()

bool isVEXTMask ( ArrayRef< int > M,
EVT VT,
bool & ReverseVEXT,
unsigned & Imm )
static

◆ isVMOVModifiedImm()

SDValue isVMOVModifiedImm ( uint64_t SplatBits,
uint64_t SplatUndef,
unsigned SplatBitSize,
SelectionDAG & DAG,
const SDLoc & dl,
EVT & VT,
EVT VectorVT,
VMOVModImmType type )
static

isVMOVModifiedImm - Check if the specified splat value corresponds to a valid vector constant for a NEON or MVE instruction with a "modified immediate" operand (e.g., VMOV).

If so, return the encoded value.

Definition at line 6892 of file ARMISelLowering.cpp.

References assert(), llvm::ARM_AM::createVMOVModImm(), llvm::SelectionDAG::getTargetConstant(), llvm::EVT::is128BitVector(), llvm_unreachable, llvm::MVEVMVNModImm, llvm::OtherModImm, SDValue(), and llvm::VMOVModImm.

Referenced by PerformANDCombine(), and PerformORCombine().

◆ isVMOVNMask()

bool isVMOVNMask ( ArrayRef< int > M,
EVT VT,
bool Top,
bool SingleSource )
static

◆ isVMOVNTruncMask()

bool isVMOVNTruncMask ( ArrayRef< int > M,
EVT ToVT,
bool rev )
static

◆ isVShiftLImm()

bool isVShiftLImm ( SDValue Op,
EVT VT,
bool isLong,
int64_t & Cnt )
static

isVShiftLImm - Check if this is a valid build_vector for the immediate operand of a vector shift left operation.

That value must be in the range: 0 <= Value < ElementBits for a left shift; or 0 <= Value <= ElementBits for a long left shift.

Definition at line 6533 of file ARMISelLowering.cpp.

References assert(), llvm::EVT::getScalarSizeInBits(), getVShiftImm(), and llvm::EVT::isVector().

◆ isVShiftRImm()

bool isVShiftRImm ( SDValue Op,
EVT VT,
bool isNarrow,
bool isIntrinsic,
int64_t & Cnt )
static

isVShiftRImm - Check if this is a valid build_vector for the immediate operand of a vector shift right operation.

For a shift opcode, the value is positive, but for an intrinsic the value count must be negative. The absolute value must be in the range: 1 <= |Value| <= ElementBits for a right shift; or 1 <= |Value| <= ElementBits/2 for a narrow right shift.

Definition at line 6547 of file ARMISelLowering.cpp.

References assert(), llvm::EVT::getScalarSizeInBits(), getVShiftImm(), isIntrinsic(), and llvm::EVT::isVector().

◆ isVTBLMask()

bool isVTBLMask ( ArrayRef< int > M,
EVT VT )
static

Definition at line 7207 of file ARMISelLowering.cpp.

Referenced by llvm::ARMTargetLowering::isShuffleMaskLegal().

◆ isVTRN_v_undef_Mask()

bool isVTRN_v_undef_Mask ( ArrayRef< int > M,
EVT VT,
unsigned & WhichResult )
static

isVTRN_v_undef_Mask - Special case of isVTRNMask for canonical form of "vector_shuffle v, v", i.e., "vector_shuffle v, undef".

Mask is e.g., <0, 0, 2, 2> instead of <0, 4, 2, 6>.

Definition at line 7274 of file ARMISelLowering.cpp.

References llvm::EVT::getScalarSizeInBits(), llvm::EVT::getVectorNumElements(), and SelectPairHalf().

Referenced by isNEONTwoResultShuffleMask().

◆ isVTRNMask()

bool isVTRNMask ( ArrayRef< int > M,
EVT VT,
unsigned & WhichResult )
static

◆ isVUZP_v_undef_Mask()

bool isVUZP_v_undef_Mask ( ArrayRef< int > M,
EVT VT,
unsigned & WhichResult )
static

isVUZP_v_undef_Mask - Special case of isVUZPMask for canonical form of "vector_shuffle v, v", i.e., "vector_shuffle v, undef".

Mask is e.g., <0, 2, 0, 2> instead of <0, 2, 4, 6>,

Definition at line 7336 of file ARMISelLowering.cpp.

References llvm::EVT::getScalarSizeInBits(), llvm::EVT::getVectorNumElements(), llvm::EVT::is64BitVector(), and SelectPairHalf().

Referenced by isNEONTwoResultShuffleMask().

◆ isVUZPMask()

bool isVUZPMask ( ArrayRef< int > M,
EVT VT,
unsigned & WhichResult )
static

◆ IsVUZPShuffleNode()

bool IsVUZPShuffleNode ( SDNode * N)
static

Definition at line 12642 of file ARMISelLowering.cpp.

References N, llvm::ARMISD::VTRN, and llvm::ARMISD::VUZP.

Referenced by AddCombineToVPADD(), and AddCombineVUZPToVPADDL().

◆ isVZIP_v_undef_Mask()

bool isVZIP_v_undef_Mask ( ArrayRef< int > M,
EVT VT,
unsigned & WhichResult )
static

isVZIP_v_undef_Mask - Special case of isVZIPMask for canonical form of "vector_shuffle v, v", i.e., "vector_shuffle v, undef".

Mask is e.g., <0, 0, 1, 1> instead of <0, 4, 1, 5>.

Definition at line 7410 of file ARMISelLowering.cpp.

References llvm::EVT::getScalarSizeInBits(), llvm::EVT::getVectorNumElements(), llvm::EVT::is64BitVector(), and SelectPairHalf().

Referenced by isNEONTwoResultShuffleMask().

◆ isVZIPMask()

bool isVZIPMask ( ArrayRef< int > M,
EVT VT,
unsigned & WhichResult )
static

◆ isZeroExtended()

bool isZeroExtended ( SDNode * N,
SelectionDAG & DAG )
static

isZeroExtended - Check if a node is a vector value that is zero-extended (or any-extended) or a constant BUILD_VECTOR with zero-extended elements.

Definition at line 9367 of file ARMISelLowering.cpp.

References llvm::ISD::ANY_EXTEND, isExtendedBUILD_VECTOR(), llvm::ISD::isZEXTLoad(), N, and llvm::ISD::ZERO_EXTEND.

◆ isZeroOrAllOnes()

bool isZeroOrAllOnes ( SDValue N,
bool AllOnes )
inlinestatic

◆ isZeroVector()

◆ LowerADDSUBSAT()

◆ LowerATOMIC_FENCE()

◆ LowerAtomicLoadStore()

SDValue LowerAtomicLoadStore ( SDValue Op,
SelectionDAG & DAG )
static

◆ LowerBUILD_VECTOR_i1()

◆ LowerBUILD_VECTORToVIDUP()

◆ LowerBuildVectorOfFPExt()

◆ LowerBuildVectorOfFPTrunc()

◆ LowerCONCAT_VECTORS()

◆ LowerCONCAT_VECTORS_i1()

◆ LowerCTPOP()

◆ LowerCTTZ()

◆ LowerEXTRACT_SUBVECTOR()

◆ LowerEXTRACT_VECTOR_ELT()

◆ LowerEXTRACT_VECTOR_ELT_i1()

◆ LowerFP_TO_INT_SAT()

◆ LowerINSERT_VECTOR_ELT_i1()

◆ LowerInterruptReturn()

◆ LowerMLOAD()

◆ LowerMUL()

◆ LowerPredicateLoad()

◆ LowerPredicateStore()

◆ LowerPREFETCH()

◆ LowerReverse_VECTOR_SHUFFLE()

◆ LowerSaturatingConditional()

◆ LowerSDIV()

◆ LowerSDIV_v4i16()

◆ LowerSDIV_v4i8()

◆ LowerSETCCCARRY()

◆ LowerShift()

◆ LowerSTORE()

◆ LowerTruncate()

◆ LowerTruncatei1()

◆ LowerUADDSUBO_CARRY()

◆ LowerUDIV()

◆ LowerVASTART()

◆ LowerVecReduce()

◆ LowerVecReduceF()

SDValue LowerVecReduceF ( SDValue Op,
SelectionDAG & DAG,
const ARMSubtarget * ST )
static

Definition at line 10233 of file ARMISelLowering.cpp.

References LowerVecReduce(), and SDValue().

Referenced by llvm::ARMTargetLowering::LowerOperation().

◆ LowerVecReduceMinMax()

◆ LowerVECTOR_SHUFFLE()

SDValue LowerVECTOR_SHUFFLE ( SDValue Op,
SelectionDAG & DAG,
const ARMSubtarget * ST )
static

Definition at line 8701 of file ARMISelLowering.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, llvm::all_of(), assert(), llvm::ARMISD::BUILD_VECTOR, llvm::ISD::BUILD_VECTOR, llvm::cast(), llvm::ISD::CONCAT_VECTORS, llvm::ISD::EXTRACT_VECTOR_ELT, GeneratePerfectShuffle(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::EVT::getFloatingPointVT(), llvm::MVT::getIntegerVT(), llvm::ShuffleVectorSDNode::getMask(), llvm::SelectionDAG::getNode(), llvm::SDValue::getNumOperands(), llvm::SDNode::getOpcode(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), llvm::SDValue::getOperand(), llvm::EVT::getScalarSizeInBits(), llvm::ShuffleVectorSDNode::getSplatIndex(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::MVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::Hi, llvm::isa(), isLegalMVEShuffleOp(), isNEONTwoResultShuffleMask(), isReverseMask(), isSingletonVEXTMask(), llvm::ShuffleVectorSDNode::isSplat(), isTruncMask(), llvm::SDNode::isUndef(), llvm::SDValue::isUndef(), isVEXTMask(), isVMOVNMask(), llvm::isVREVMask(), llvm::Lo, LowerReverse_VECTOR_SHUFFLE(), LowerVECTOR_SHUFFLE_i1(), LowerVECTOR_SHUFFLEUsingMovs(), LowerVECTOR_SHUFFLEUsingOneOff(), LowerVECTOR_SHUFFLEv8i8(), llvm::ARMISD::MVETRUNC, llvm::PerfectShuffleTable, llvm::ISD::SCALAR_TO_VECTOR, SDValue(), llvm::ISD::SRL, std::swap(), llvm::ARMISD::VDUP, llvm::ARMISD::VDUPLANE, llvm::ARMISD::VECTOR_REG_CAST, llvm::ARMISD::VEXT, llvm::ARMISD::VMOVN, llvm::ARMISD::VREV16, llvm::ARMISD::VREV32, and llvm::ARMISD::VREV64.

Referenced by llvm::ARMTargetLowering::LowerOperation().

◆ LowerVECTOR_SHUFFLE_i1()

◆ LowerVECTOR_SHUFFLEUsingMovs()

◆ LowerVECTOR_SHUFFLEUsingOneOff()

◆ LowerVECTOR_SHUFFLEv8i8()

◆ LowerVectorExtend()

◆ LowerVectorFP_TO_INT()

◆ LowerVectorINT_TO_FP()

◆ LowerVSETCC()

◆ LowerWRITE_REGISTER()

◆ OtherSucc()

◆ ParseBFI()

◆ PerformADDCombine()

SDValue PerformADDCombine ( SDNode * N,
TargetLowering::DAGCombinerInfo & DCI,
const ARMSubtarget * Subtarget )
static

PerformADDCombine - Target-specific dag combine xforms for ISD::ADD.

Definition at line 14044 of file ARMISelLowering.cpp.

References llvm::TargetLowering::DAGCombinerInfo::DAG, N, PerformADDCombineWithOperands(), PerformADDVecReduce(), and PerformSHLSimplify().

Referenced by llvm::ARMTargetLowering::PerformDAGCombine().

◆ PerformADDCombineWithOperands()

SDValue PerformADDCombineWithOperands ( SDNode * N,
SDValue N0,
SDValue N1,
TargetLowering::DAGCombinerInfo & DCI,
const ARMSubtarget * Subtarget )
static

PerformADDCombineWithOperands - Try DAG combinations for an ADD with operands N0 and N1.

This is a helper for PerformADDCombine that is called with the default operands, and if that fails, with commuted operands.

Definition at line 13557 of file ARMISelLowering.cpp.

References AddCombineBUILD_VECTORToVPADDL(), AddCombineToVPADD(), AddCombineVUZPToVPADDL(), combineSelectAndUse(), llvm::SDValue::getNode(), llvm::SDNode::hasOneUse(), N, and SDValue().

Referenced by PerformADDCombine(), and PerformADDCombine().

◆ PerformAddcSubcCombine()

◆ PerformADDECombine()

SDValue PerformADDECombine ( SDNode * N,
TargetLowering::DAGCombinerInfo & DCI,
const ARMSubtarget * Subtarget )
static

◆ PerformAddeSubeCombine()

◆ PerformADDVecReduce()

◆ PerformANDCombine()

◆ PerformARMBUILD_VECTORCombine()

◆ PerformBFICombine()

◆ PerformBITCASTCombine()

◆ PerformBUILD_VECTORCombine()

◆ PerformCMPZCombine()

SDValue PerformCMPZCombine ( SDNode * N,
SelectionDAG & DAG )
static

◆ PerformCSETCombine()

◆ PerformExtendCombine()

◆ PerformExtractEltCombine()

◆ PerformExtractEltToVMOVRRD()

◆ PerformExtractFpToIntStores()

◆ PerformFADDCombine()

SDValue PerformFADDCombine ( SDNode * N,
SelectionDAG & DAG,
const ARMSubtarget * Subtarget )
static

◆ PerformFADDVCMLACombine()

SDValue PerformFADDVCMLACombine ( SDNode * N,
SelectionDAG & DAG )
static

◆ PerformFAddVSelectCombine()

◆ PerformFPExtendCombine()

SDValue PerformFPExtendCombine ( SDNode * N,
SelectionDAG & DAG,
const ARMSubtarget * ST )
static

◆ PerformHWLoopCombine()

◆ PerformInsertEltCombine()

◆ PerformInsertSubvectorCombine()

◆ PerformLOADCombine()

◆ PerformLongShiftCombine()

◆ PerformMinMaxCombine()

◆ PerformMinMaxToSatCombine()

◆ PerformMULCombine()

◆ PerformMVEVLDCombine()

◆ PerformMVEVMULLCombine()

◆ PerformORCombine()

◆ PerformORCombine_i1()

◆ PerformORCombineToBFI()

◆ PerformORCombineToSMULWBT()

◆ PerformPREDICATE_CASTCombine()

◆ PerformReduceShuffleCombine()

◆ PerformSELECTCombine()

◆ PerformShiftCombine()

SDValue PerformShiftCombine ( SDNode * N,
TargetLowering::DAGCombinerInfo & DCI,
const ARMSubtarget * ST )
static

PerformShiftCombine - Checks for immediate versions of vector shifts and lowers them.

As with the vector shift intrinsics, this is done during DAG combining instead of DAG legalizing because the build_vectors for 64-bit vector element shift counts are generally not legal, and it is hard to see their values after they get legalized to loads from a constant pool.

Definition at line 17744 of file ARMISelLowering.cpp.

References llvm::ISD::AND, llvm::countl_zero(), llvm::TargetLowering::DAGCombinerInfo::DAG, DL, llvm::dyn_cast(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SDNode::getOperand(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::ConstantSDNode::getZExtValue(), llvm::TargetLowering::DAGCombinerInfo::isBeforeLegalize(), llvm::TargetLowering::DAGCombinerInfo::isCalledByLegalizer(), llvm::isMask_32(), llvm::TargetLoweringBase::isTypeLegal(), llvm::EVT::isVector(), isVShiftLImm(), isVShiftRImm(), llvm_unreachable, N, SDValue(), llvm::ISD::SHL, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ARMISD::VSHLIMM, llvm::ARMISD::VSHRsIMM, and llvm::ARMISD::VSHRuIMM.

Referenced by llvm::ARMTargetLowering::PerformDAGCombine().

◆ PerformSHLSimplify()

◆ PerformShuffleVMOVNCombine()

◆ PerformSignExtendInregCombine()

SDValue PerformSignExtendInregCombine ( SDNode * N,
SelectionDAG & DAG )
static

◆ PerformSplittingMVEEXTToWideningLoad()

◆ PerformSplittingMVETruncToNarrowingStores()

◆ PerformSplittingToNarrowingStores()

◆ PerformSplittingToWideningLoad()

◆ PerformSTORECombine()

SDValue PerformSTORECombine ( SDNode * N,
TargetLowering::DAGCombinerInfo & DCI,
const ARMSubtarget * Subtarget )
static

PerformSTORECombine - Target-specific dag combine xforms for ISD::STORE.

Definition at line 16825 of file ARMISelLowering.cpp.

References llvm::ISD::ADD, llvm::TargetLowering::DAGCombinerInfo::AddToWorklist(), llvm::cast(), CombineBaseUpdate(), llvm::TargetLowering::DAGCombinerInfo::DAG, DL, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::MemSDNode::getAAInfo(), llvm::MemSDNode::getAlign(), llvm::MemSDNode::getBaseAlign(), llvm::StoreSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::MachineMemOperand::getFlags(), llvm::MemSDNode::getMemOperand(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::SDValue::getOperand(), llvm::MemSDNode::getPointerInfo(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SDValue::getValue(), llvm::StoreSDNode::getValue(), llvm::SDValue::getValueType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::MachinePointerInfo::getWithOffset(), llvm::SDNode::hasOneUse(), isBigEndian(), llvm::DataLayout::isBigEndian(), llvm::ISD::isNormalStore(), llvm::TargetLoweringBase::isTypeLegal(), llvm::EVT::isVector(), llvm::MemSDNode::isVolatile(), N, PerformExtractFpToIntStores(), PerformSplittingMVETruncToNarrowingStores(), PerformSplittingToNarrowingStores(), PerformTruncatingStoreCombine(), SDValue(), and llvm::ARMISD::VMOVDRR.

Referenced by llvm::ARMTargetLowering::PerformDAGCombine().

◆ PerformSUBCombine()

◆ PerformSubCSINCCombine()

◆ PerformTruncatingStoreCombine()

◆ PerformUMLALCombine()

◆ PerformVCMPCombine()

◆ PerformVCVTCombine()

SDValue PerformVCVTCombine ( SDNode * N,
SelectionDAG & DAG,
const ARMSubtarget * Subtarget )
static

PerformVCVTCombine - VCVT (floating-point to fixed-point, Advanced SIMD) can replace combinations of VMUL and VCVT (floating-point to integer) when the VMUL has a constant operand that is a power of 2.

Example (assume d17 = <float 8.000000e+00, float 8.000000e+00>): vmul.f32 d16, d17, d16 vcvt.s32.f32 d16, d16 becomes: vcvt.s32.f32 d16, d16, #3

Definition at line 16915 of file ARMISelLowering.cpp.

References llvm::CallingConv::C, llvm::cast(), llvm::ISD::FMUL, llvm::ISD::FP_TO_SINT, llvm::SelectionDAG::getConstant(), llvm::BuildVectorSDNode::getConstantFPSplatPow2ToLog2Int(), llvm::SelectionDAG::getNode(), llvm::MVT::getSizeInBits(), llvm::ISD::INTRINSIC_WO_CHAIN, llvm::isa(), isSigned(), N, SDValue(), and llvm::ISD::TRUNCATE.

Referenced by llvm::ARMTargetLowering::PerformDAGCombine().

◆ PerformVDUPCombine()

◆ PerformVDUPLANECombine()

◆ PerformVECREDUCE_ADDCombine()

◆ PerformVECTOR_REG_CASTCombine()

◆ PerformVECTOR_SHUFFLECombine()

◆ PerformVLDCombine()

◆ PerformVMOVDRRCombine()

SDValue PerformVMOVDRRCombine ( SDNode * N,
SelectionDAG & DAG )
static

PerformVMOVDRRCombine - Target-specific dag combine xforms for ARMISD::VMOVDRR.

This is also used for BUILD_VECTORs with 2 operands.

Definition at line 15167 of file ARMISelLowering.cpp.

References llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::getResNo(), N, SDValue(), and llvm::ARMISD::VMOVRRD.

Referenced by PerformBUILD_VECTORCombine(), and llvm::ARMTargetLowering::PerformDAGCombine().

◆ PerformVMOVhrCombine()

◆ PerformVMOVNCombine()

◆ PerformVMOVrhCombine()

◆ PerformVMOVRRDCombine()

◆ PerformVMULCombine()

SDValue PerformVMULCombine ( SDNode * N,
TargetLowering::DAGCombinerInfo & DCI,
const ARMSubtarget * Subtarget )
static

PerformVMULCombine Distribute (A + B) * C to (A * C) + (B * C) to take advantage of the special multiplier accumulator forwarding.

vmul d3, d0, d2 vmla d3, d1, d2 is faster than vadd d3, d0, d1 vmul d3, d3, d2

Definition at line 14140 of file ARMISelLowering.cpp.

References llvm::ISD::ADD, llvm::TargetLowering::DAGCombinerInfo::DAG, DL, llvm::ISD::FADD, llvm::ISD::FSUB, llvm::SelectionDAG::getNode(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), llvm::ISD::MUL, N, SDValue(), llvm::ISD::SUB, and std::swap().

Referenced by PerformMULCombine().

◆ PerformVMulVCTPCombine()

SDValue PerformVMulVCTPCombine ( SDNode * N,
SelectionDAG & DAG,
const ARMSubtarget * Subtarget )
static

PerformVMulVCTPCombine - VCVT (fixed-point to floating-point, Advanced SIMD) can replace combinations of VCVT (integer to floating-point) and VMUL when the VMUL has a constant operand that is a power of 2.

Example (assume d17 = <float 0.125, float 0.125>): vcvt.f32.s32 d16, d16 vmul.f32 d16, d16, d17 becomes: vcvt.f32.s32 d16, d16, #3

Definition at line 17055 of file ARMISelLowering.cpp.

References llvm::CallingConv::C, llvm::APFloat::convertToInteger(), DL, llvm::SelectionDAG::getConstant(), llvm::APFloat::getExactInverse(), llvm::SelectionDAG::getNode(), llvm::MVT::getSizeInBits(), llvm::ConstantFPSDNode::getValueAPF(), llvm::ISD::INTRINSIC_WO_CHAIN, llvm::isa(), llvm::isConstOrConstSplatFP(), isSigned(), N, llvm::APFloatBase::opOK, llvm::APFloatBase::rmTowardZero, SDValue(), llvm::ISD::SIGN_EXTEND, llvm::ISD::SINT_TO_FP, llvm::ISD::UINT_TO_FP, and llvm::ISD::ZERO_EXTEND.

Referenced by llvm::ARMTargetLowering::PerformDAGCombine().

◆ PerformVQDMULHCombine() [1/2]

◆ PerformVQDMULHCombine() [2/2]

◆ PerformVQMOVNCombine()

◆ PerformVSELECTCombine()

◆ PerformVSetCCToVCTPCombine()

◆ PerformXORCombine()

◆ PromoteMVEPredVector()

◆ promoteToConstantPool()

◆ ReplaceCMP_SWAP_64Results()

◆ ReplaceLongIntrinsic()

◆ ReplaceREADCYCLECOUNTER()

◆ SearchLoopIntrinsic()

SDValue SearchLoopIntrinsic ( SDValue N,
ISD::CondCode & CC,
int & Imm,
bool & Negate )
static

◆ SelectPairHalf()

unsigned SelectPairHalf ( unsigned Elements,
ArrayRef< int > Mask,
unsigned Index )
static

◆ SkipExtensionForVMULL()

SDValue SkipExtensionForVMULL ( SDNode * N,
SelectionDAG & DAG )
static

SkipExtensionForVMULL - For a node that is a SIGN_EXTEND, ZERO_EXTEND, ANY_EXTEND, extending load, or BUILD_VECTOR with extended elements, return the unextended value.

The unextended vector should be 64 bits so that it can be used as an operand to a VMULL instruction. If the original vector size before extension is less than 64 bits we add a an extension to resize the vector to 64 bits.

Definition at line 9442 of file ARMISelLowering.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, AddRequiredExtensionForVMULL(), llvm::ISD::ANY_EXTEND, assert(), llvm::ISD::BUILD_VECTOR, llvm::dyn_cast(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getDataLayout(), llvm::MVT::getIntegerVT(), llvm::SelectionDAG::getNode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::EVT::getScalarSizeInBits(), llvm::SDValue::getValue(), llvm::SDNode::getValueType(), llvm::EVT::getVectorNumElements(), llvm::MVT::getVectorVT(), llvm::DataLayout::isBigEndian(), llvm::ISD::isSEXTLoad(), llvm::ISD::isZEXTLoad(), N, llvm::SelectionDAG::ReplaceAllUsesOfValueWith(), SDValue(), llvm::ISD::SIGN_EXTEND, SkipLoadExtensionForVMULL(), llvm::ISD::ZERO_EXTEND, and llvm::APInt::zextOrTrunc().

Referenced by LowerMUL().

◆ SkipLoadExtensionForVMULL()

SDValue SkipLoadExtensionForVMULL ( LoadSDNode * LD,
SelectionDAG & DAG )
static

SkipLoadExtensionForVMULL - return a load of the original vector size that does not do any sign/zero extension.

If the original vector is less than 64 bits, an appropriate extension will be added after the load to reach a total size of 64 bits. We have to add the extension separately because ARM does not have a sign/zero extending load for vectors.

Definition at line 9418 of file ARMISelLowering.cpp.

References getExtensionTo64Bits(), llvm::SelectionDAG::getExtLoad(), and llvm::SelectionDAG::getLoad().

Referenced by SkipExtensionForVMULL().

◆ STATISTIC() [1/4]

STATISTIC ( NumConstpoolPromoted ,
"Number of constants with their storage promoted into constant pools"  )

◆ STATISTIC() [2/4]

STATISTIC ( NumLoopByVals ,
"Number of loops generated for byval arguments"  )

◆ STATISTIC() [3/4]

STATISTIC ( NumMovwMovt ,
"Number of GAs materialized with movw + movt"  )

◆ STATISTIC() [4/4]

STATISTIC ( NumTailCalls ,
"Number of tail calls"  )

◆ TryCombineBaseUpdate()

bool TryCombineBaseUpdate ( struct BaseUpdateTarget & Target,
struct BaseUpdateUser & User,
bool SimpleConstIncOnly,
TargetLowering::DAGCombinerInfo & DCI )
static

Definition at line 15827 of file ARMISelLowering.cpp.

References AbstractManglingParser< Derived, Alloc >::Ops, llvm::ArrayRef(), assert(), llvm::cast(), llvm::TargetLowering::DAGCombinerInfo::CombineTo(), llvm::TargetLowering::DAGCombinerInfo::DAG, llvm::dyn_cast(), llvm::MemSDNode::getAlign(), llvm::SelectionDAG::getConstant(), llvm::MVT::getIntegerVT(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::MemSDNode::getMemOperand(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::EVT::getScalarSizeInBits(), llvm::EVT::getSizeInBits(), llvm::MVT::getSizeInBits(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::MVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::isa(), isValidBaseUpdate(), llvm_unreachable, N, llvm::SmallVectorTemplateBase< T, bool >::push_back(), SDValue(), llvm::Align::value(), llvm::ARMISD::VLD1_UPD, llvm::ARMISD::VLD1DUP, llvm::ARMISD::VLD1DUP_UPD, llvm::ARMISD::VLD1x2_UPD, llvm::ARMISD::VLD1x3_UPD, llvm::ARMISD::VLD1x4_UPD, llvm::ARMISD::VLD2_UPD, llvm::ARMISD::VLD2DUP, llvm::ARMISD::VLD2DUP_UPD, llvm::ARMISD::VLD2LN_UPD, llvm::ARMISD::VLD3_UPD, llvm::ARMISD::VLD3DUP, llvm::ARMISD::VLD3DUP_UPD, llvm::ARMISD::VLD3LN_UPD, llvm::ARMISD::VLD4_UPD, llvm::ARMISD::VLD4DUP, llvm::ARMISD::VLD4DUP_UPD, llvm::ARMISD::VLD4LN_UPD, llvm::ARMISD::VST1_UPD, llvm::ARMISD::VST1x2_UPD, llvm::ARMISD::VST1x3_UPD, llvm::ARMISD::VST1x4_UPD, llvm::ARMISD::VST2_UPD, llvm::ARMISD::VST2LN_UPD, llvm::ARMISD::VST3_UPD, llvm::ARMISD::VST3LN_UPD, llvm::ARMISD::VST4_UPD, and llvm::ARMISD::VST4LN_UPD.

Referenced by CombineBaseUpdate().

◆ TryDistrubutionADDVecReduce()

◆ WinDBZCheckDenominator()

SDValue WinDBZCheckDenominator ( SelectionDAG & DAG,
SDNode * N,
SDValue InChain )
static

Variable Documentation

◆ ARMInterworking

cl::opt< bool > ARMInterworking("arm-interworking", cl::Hidden, cl::desc("Enable / disable ARM interworking (for debugging only)"), cl::init(true)) ( "arm-interworking" ,
cl::Hidden ,
cl::desc("Enable / disable ARM interworking (for debugging only)") ,
cl::init(true)  )
static

◆ ArmMaxBaseUpdatesToCheck

cl::opt< unsigned > ArmMaxBaseUpdatesToCheck("arm-max-base-updates-to-check", cl::Hidden, cl::desc("Maximum number of base-updates to check generating postindex."), cl::init(64)) ( "arm-max-base-updates-to-check" ,
cl::Hidden ,
cl::desc("Maximum number of base-updates to check generating postindex.") ,
cl::init(64)  )

Referenced by CombineBaseUpdate().

◆ ConstpoolPromotionMaxSize

cl::opt< unsigned > ConstpoolPromotionMaxSize("arm-promote-constant-max-size", cl::Hidden, cl::desc("Maximum size of constant to promote into a constant pool"), cl::init(64)) ( "arm-promote-constant-max-size" ,
cl::Hidden ,
cl::desc("Maximum size of constant to promote into a constant pool") ,
cl::init(64)  )
static

Referenced by promoteToConstantPool().

◆ ConstpoolPromotionMaxTotal

cl::opt< unsigned > ConstpoolPromotionMaxTotal("arm-promote-constant-max-total", cl::Hidden, cl::desc("Maximum size of ALL constants to promote into a constant pool"), cl::init(128)) ( "arm-promote-constant-max-total" ,
cl::Hidden ,
cl::desc("Maximum size of ALL constants to promote into a constant pool") ,
cl::init(128)  )
static

Referenced by promoteToConstantPool().

◆ EnableConstpoolPromotion

cl::opt< bool > EnableConstpoolPromotion("arm-promote-constant", cl::Hidden, cl::desc("Enable / disable promotion of unnamed_addr constants into " "constant pools"), cl::init(false)) ( "arm-promote-constant" ,
cl::Hidden ,
cl::desc("Enable / disable promotion of unnamed_addr constants into " "constant pools") ,
cl::init(false)  )
static

Referenced by promoteToConstantPool().

◆ FlagsVT

MVT FlagsVT = MVT::i32
constexpr

Value type used for "flags" operands / results (either CPSR or FPSCR_NZCV).

Definition at line 157 of file ARMISelLowering.cpp.

◆ GPRArgRegs

const MCPhysReg GPRArgRegs[]
static
Initial value:
= {
ARM::R0, ARM::R1, ARM::R2, ARM::R3
}

Definition at line 160 of file ARMISelLowering.cpp.

◆ MVEMaxSupportedInterleaveFactor

cl::opt< unsigned > MVEMaxSupportedInterleaveFactor("mve-max-interleave-factor", cl::Hidden, cl::desc("Maximum interleave factor for MVE VLDn to generate."), cl::init(2)) ( "mve-max-interleave-factor" ,
cl::Hidden ,
cl::desc("Maximum interleave factor for MVE VLDn to generate.") ,
cl::init(2)  )