|
LLVM 24.0.0git
|
#include "AArch64.h"#include "AArch64ExpandImm.h"#include "AArch64MachineFunctionInfo.h"#include "AArch64TargetMachine.h"#include "MCTargetDesc/AArch64AddressingModes.h"#include "llvm/ADT/APSInt.h"#include "llvm/CodeGen/ISDOpcodes.h"#include "llvm/CodeGen/SDPatternMatch.h"#include "llvm/CodeGen/SelectionDAGISel.h"#include "llvm/IR/Function.h"#include "llvm/IR/GlobalValue.h"#include "llvm/IR/Intrinsics.h"#include "llvm/IR/IntrinsicsAArch64.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 "AArch64GenDAGISel.inc"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "aarch64-isel" |
| #define | PASS_NAME "AArch64 Instruction Selection" |
Enumerations | |
| enum class | SelectTypeKind { Int1 = 0 , Int = 1 , FP = 2 , AnyType = 3 } |
Functions | |
| static SDValue | addBitcastHints (SelectionDAG &DAG, SDNode &N) |
| addBitcastHints - This method adds bitcast hints to the operands of a node to help instruction selector determine which operands are in Neon registers. | |
| static bool | isIntImmediate (const SDNode *N, uint64_t &Imm) |
| isIntImmediate - This method tests to see if the node is a constant operand. | |
| static bool | isIntImmediate (SDValue N, uint64_t &Imm) |
| static bool | isOpcWithIntImmediate (const SDNode *N, unsigned Opc, uint64_t &Imm) |
| static bool | isIntImmediateEq (SDValue N, const uint64_t ImmExpected) |
| static APInt | DecodeFMOVImm (uint64_t Imm, unsigned RegWidth) |
| static std::optional< APInt > | DecodeNEONSplat (SDValue N) |
| static std::optional< APInt > | GetNEONSplatValue (SDValue N) |
| static AArch64_AM::ShiftExtendType | getShiftTypeForNode (SDValue N) |
| getShiftTypeForNode - Translate a shift node to the corresponding ShiftType value. | |
| static bool | isMemOpOrPrefetch (SDNode *N) |
| static bool | isWorthFoldingSHL (SDValue V) |
| Determine whether it is worth it to fold SHL into the addressing mode. | |
| static AArch64_AM::ShiftExtendType | getExtendTypeForNode (SDValue N, bool IsLoadStore=false) |
| getExtendTypeForNode - Translate an extend node to the corresponding ExtendType value. | |
| static SDValue | narrowIfNeeded (SelectionDAG *CurDAG, SDValue N) |
| Instructions that accept extend modifiers like UXTW expect the register being extended to be a GPR32, but the incoming DAG might be acting on a GPR64 (either via SEXT_INREG or AND). | |
| static bool | isWorthFoldingADDlow (SDValue N) |
| If there's a use of this ADDlow that's not itself a load/store then we'll need to create a real ADD instruction from it anyway and there's no point in folding it into the mem op. | |
| static bool | isValidAsScaledImmediate (int64_t Offset, unsigned Range, unsigned Size) |
| Check if the immediate offset is valid as a scaled immediate. | |
| static SDValue | Widen (SelectionDAG *CurDAG, SDValue N) |
| static bool | isPreferredADD (int64_t ImmOff) |
| static std::tuple< SDValue, SDValue > | extractPtrauthBlendDiscriminators (SDValue Disc, SelectionDAG *DAG) |
| template<SelectTypeKind Kind> | |
| static unsigned | SelectOpcodeFromVT (EVT VT, ArrayRef< unsigned > Opcodes) |
| This function selects an opcode from a list of opcodes, which is expected to be the opcode for { 8-bit, 16-bit, 32-bit, 64-bit } element types, in this order. | |
| bool | SelectSMETile (unsigned &BaseReg, unsigned TileNum) |
| static SDValue | NarrowVector (SDValue V128Reg, SelectionDAG &DAG) |
| NarrowVector - Given a value in the V128 register class, produce the equivalent value in the V64 register class. | |
| static bool | isBitfieldExtractOpFromAnd (SelectionDAG *CurDAG, SDNode *N, unsigned &Opc, SDValue &Opd0, unsigned &LSB, unsigned &MSB, unsigned NumberOfIgnoredLowBits, bool BiggerPattern) |
| static bool | isBitfieldExtractOpFromSExtInReg (SDNode *N, unsigned &Opc, SDValue &Opd0, unsigned &Immr, unsigned &Imms) |
| static bool | isSeveralBitsExtractOpFromShr (SDNode *N, unsigned &Opc, SDValue &Opd0, unsigned &LSB, unsigned &MSB) |
| static bool | isBitfieldExtractOpFromShr (SDNode *N, unsigned &Opc, SDValue &Opd0, unsigned &Immr, unsigned &Imms, bool BiggerPattern) |
| static bool | isBitfieldExtractOp (SelectionDAG *CurDAG, SDNode *N, unsigned &Opc, SDValue &Opd0, unsigned &Immr, unsigned &Imms, unsigned NumberOfIgnoredLowBits=0, bool BiggerPattern=false) |
| static bool | isBitfieldDstMask (uint64_t DstMask, const APInt &BitsToBeInserted, unsigned NumberOfIgnoredHighBits, EVT VT) |
| Does DstMask form a complementary pair with the mask provided by BitsToBeInserted, suitable for use in a BFI instruction. | |
| static void | getUsefulBits (SDValue Op, APInt &UsefulBits, unsigned Depth=0) |
| static void | getUsefulBitsFromAndWithImmediate (SDValue Op, APInt &UsefulBits, unsigned Depth) |
| static void | getUsefulBitsFromBitfieldMoveOpd (SDValue Op, APInt &UsefulBits, uint64_t Imm, uint64_t MSB, unsigned Depth) |
| static void | getUsefulBitsFromUBFM (SDValue Op, APInt &UsefulBits, unsigned Depth) |
| static void | getUsefulBitsFromOrWithShiftedReg (SDValue Op, APInt &UsefulBits, unsigned Depth) |
| static void | getUsefulBitsFromBFM (SDValue Op, SDValue Orig, APInt &UsefulBits, unsigned Depth) |
| static void | getUsefulBitsForUse (SDNode *UserNode, APInt &UsefulBits, SDValue Orig, unsigned Depth) |
| static SDValue | getLeftShift (SelectionDAG *CurDAG, SDValue Op, int ShlAmount) |
| Create a machine node performing a notional SHL of Op by ShlAmount. | |
| static bool | isBitfieldPositioningOpFromAnd (SelectionDAG *CurDAG, SDValue Op, bool BiggerPattern, const uint64_t NonZeroBits, SDValue &Src, int &DstLSB, int &Width) |
| static bool | isBitfieldPositioningOpFromShl (SelectionDAG *CurDAG, SDValue Op, bool BiggerPattern, const uint64_t NonZeroBits, SDValue &Src, int &DstLSB, int &Width) |
| static bool | isBitfieldPositioningOp (SelectionDAG *CurDAG, SDValue Op, bool BiggerPattern, SDValue &Src, int &DstLSB, int &Width) |
| Does this tree qualify as an attempt to move a bitfield into position, essentially "(and (shl VAL, N), Mask)" or (shl VAL, N). | |
| static bool | isSeveralBitsPositioningOpFromShl (const uint64_t ShlImm, SDValue Op, SDValue &Src, int &DstLSB, int &Width) |
| static bool | isShiftedMask (uint64_t Mask, EVT VT) |
| static bool | tryBitfieldInsertOpFromOrAndImm (SDNode *N, SelectionDAG *CurDAG) |
| static bool | isWorthFoldingIntoOrrWithShift (SDValue Dst, SelectionDAG *CurDAG, SDValue &ShiftedOperand, uint64_t &EncodedShiftImm) |
| static bool | tryOrrWithShift (SDNode *N, SDValue OrOpd0, SDValue OrOpd1, SDValue Src, SDValue Dst, SelectionDAG *CurDAG, const bool BiggerPattern) |
| static bool | tryBitfieldInsertOpFromOr (SDNode *N, const APInt &UsefulBits, SelectionDAG *CurDAG) |
| static bool | checkCVTFixedPointOperandWithFBits (SelectionDAG *CurDAG, SDValue N, SDValue &FixedPos, unsigned RegWidth, bool isReciprocal) |
| static bool | checkCVTFixedPointOperandWithFBitsForVectors (SelectionDAG *CurDAG, SDValue N, SDValue &FixedPos, unsigned RegWidth, bool isReciprocal) |
| static int | getIntOperandFromRegisterString (StringRef RegString) |
| static SDValue | getZeroRegister (SelectionDAG &DAG, SDLoc DL, EVT VT) |
| Returns a copy from WZR or XZR. | |
| static EVT | getPackedVectorTypeFromPredicateType (LLVMContext &Ctx, EVT PredVT, unsigned NumVec) |
When PredVT is a scalable vector predicate in the form MVT::nx<M>xi1, it builds the correspondent scalable vector of integers MVT::nx<M>xi<bits> s.t. | |
| static EVT | getMultipleVectorType (LLVMContext &Ctx, EVT VecVT, unsigned NumVec) |
Builds an integer vector type large enough to hold NumVec instances of VecVT. | |
| static EVT | getMemVTFromNode (LLVMContext &Ctx, SDNode *Root) |
Return the EVT of the data associated to a memory operation in Root. | |
| #define DEBUG_TYPE "aarch64-isel" |
Definition at line 35 of file AArch64ISelDAGToDAG.cpp.
| #define PASS_NAME "AArch64 Instruction Selection" |
Definition at line 36 of file AArch64ISelDAGToDAG.cpp.
|
strong |
| Enumerator | |
|---|---|
| Int1 | |
| Int | |
| FP | |
| AnyType | |
Definition at line 2085 of file AArch64ISelDAGToDAG.cpp.
|
static |
addBitcastHints - This method adds bitcast hints to the operands of a node to help instruction selector determine which operands are in Neon registers.
Definition at line 575 of file AArch64ISelDAGToDAG.cpp.
References assert(), DL, E(), llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getNode(), llvm::EVT::getScalarType(), I, N, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorImpl< T >::reserve().
|
static |
Definition at line 4257 of file AArch64ISelDAGToDAG.cpp.
References llvm::cast(), llvm::CheckFixedPointOperandConstant(), llvm::dyn_cast(), llvm::ConstantPoolSDNode::getConstVal(), llvm::SelectionDAG::getTargetConstant(), llvm::isa(), and N.
|
static |
Definition at line 4285 of file AArch64ISelDAGToDAG.cpp.
References llvm::ISD::BITCAST, llvm::CheckFixedPointOperandConstant(), DecodeFMOVImm(), llvm::SelectionDAG::getTargetConstant(), llvm::APFloatBase::IEEEdouble(), llvm::APFloatBase::IEEEhalf(), llvm::APFloatBase::IEEEsingle(), llvm::isa(), llvm_unreachable, and N.
Definition at line 632 of file AArch64ISelDAGToDAG.cpp.
References assert(), llvm::AArch64_AM::decodeAdvSIMDModImmType11(), and llvm::AArch64_AM::decodeAdvSIMDModImmType12().
Referenced by checkCVTFixedPointOperandWithFBitsForVectors(), and DecodeNEONSplat().
Definition at line 641 of file AArch64ISelDAGToDAG.cpp.
References assert(), llvm::AArch64_AM::decodeAdvSIMDModImmType10(), DecodeFMOVImm(), llvm::dyn_cast(), llvm::ISD::isConstantSplatVector(), N, and llvm::APInt::trunc().
Referenced by GetNEONSplatValue().
|
static |
Definition at line 1710 of file AArch64ISelDAGToDAG.cpp.
References DL, llvm::dyn_cast(), llvm::SDNode::getConstantOperandVal(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::SelectionDAG::getRegister(), llvm::SelectionDAG::getTargetConstant(), llvm::ISD::INTRINSIC_WO_CHAIN, and llvm::isUInt().
Referenced by llvm::AArch64CallLowering::lowerCall().
|
static |
getExtendTypeForNode - Translate an extend node to the corresponding ExtendType value.
Definition at line 982 of file AArch64ISelDAGToDAG.cpp.
References llvm::ISD::AND, llvm::ISD::ANY_EXTEND, assert(), llvm::cast(), llvm::dyn_cast(), llvm::ConstantSDNode::getZExtValue(), llvm::AArch64_AM::InvalidShiftExtend, N, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::AArch64_AM::SXTB, llvm::AArch64_AM::SXTH, llvm::AArch64_AM::SXTW, llvm::AArch64_AM::UXTB, llvm::AArch64_AM::UXTH, llvm::AArch64_AM::UXTW, and llvm::ISD::ZERO_EXTEND.
|
static |
Definition at line 4365 of file AArch64ISelDAGToDAG.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, assert(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::StringRef::split().
|
static |
Create a machine node performing a notional SHL of Op by ShlAmount.
If ShlAmount is negative, do a (logical) right-shift instead. If ShlAmount is 0, return Op unchanged.
Definition at line 3409 of file AArch64ISelDAGToDAG.cpp.
References assert(), llvm::BitWidth, llvm::SelectionDAG::getMachineNode(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetConstant(), and SDValue().
Referenced by isBitfieldPositioningOpFromAnd(), and isBitfieldPositioningOpFromShl().
|
static |
Return the EVT of the data associated to a memory operation in Root.
If such EVT cannot be retrieved, it returns an invalid EVT.
Definition at line 7862 of file AArch64ISelDAGToDAG.cpp.
References llvm::cast(), llvm::EVT::changeVectorElementType(), llvm::dyn_cast(), llvm::SDNode::getConstantOperandVal(), getMultipleVectorType(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), getPackedVectorTypeFromPredicateType(), llvm::SDNode::getValueType(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::isa(), llvm_unreachable, llvm::Load, and llvm::Store.
|
static |
Builds an integer vector type large enough to hold NumVec instances of VecVT.
Definition at line 7855 of file AArch64ISelDAGToDAG.cpp.
References llvm::EVT::changeTypeToInteger(), llvm::EVT::getScalarType(), llvm::EVT::getVectorElementCount(), and llvm::EVT::getVectorVT().
Referenced by getMemVTFromNode().
Definition at line 672 of file AArch64ISelDAGToDAG.cpp.
References DecodeNEONSplat(), llvm::APInt::getSplat(), and N.
|
static |
When PredVT is a scalable vector predicate in the form MVT::nx<M>xi1, it builds the correspondent scalable vector of integers MVT::nx<M>xi<bits> s.t.
M x bits = 128. When targeting structured vectors (NumVec >1), the output data type is MVT::nx<M*NumVec>xi<bits> s.t. M x bits = 128. If the input PredVT is not in the form MVT::nx<M>xi1, it returns an invalid EVT.
Definition at line 7835 of file AArch64ISelDAGToDAG.cpp.
References assert(), llvm::EVT::getIntegerVT(), llvm::EVT::getVectorElementCount(), llvm::EVT::getVectorVT(), llvm::EVT::isScalableVectorOf(), and llvm::AArch64::SVEBitsPerBlock.
Referenced by getMemVTFromNode().
|
static |
getShiftTypeForNode - Translate a shift node to the corresponding ShiftType value.
Definition at line 828 of file AArch64ISelDAGToDAG.cpp.
References llvm::AArch64_AM::ASR, llvm::AArch64_AM::InvalidShiftExtend, llvm::AArch64_AM::LSL, llvm::AArch64_AM::LSR, N, llvm::AArch64_AM::ROR, llvm::ISD::ROTR, llvm::ISD::SHL, llvm::ISD::SRA, and llvm::ISD::SRL.
Definition at line 3382 of file AArch64ISelDAGToDAG.cpp.
References llvm::Depth, llvm::APInt::flipAllBits(), llvm::APInt::getBitWidth(), getUsefulBitsForUse(), and llvm::SelectionDAG::MaxRecursionDepth.
Referenced by getUsefulBitsFromAndWithImmediate(), getUsefulBitsFromBFM(), getUsefulBitsFromBitfieldMoveOpd(), and getUsefulBitsFromOrWithShiftedReg().
|
static |
Definition at line 3334 of file AArch64ISelDAGToDAG.cpp.
References llvm::Depth, llvm::APInt::getBitWidth(), llvm::SDNode::getMachineOpcode(), llvm::SDNode::getOperand(), getUsefulBitsFromAndWithImmediate(), getUsefulBitsFromBFM(), getUsefulBitsFromOrWithShiftedReg(), getUsefulBitsFromUBFM(), llvm::SDNode::isMachineOpcode(), and SDValue().
Referenced by getUsefulBits().
Definition at line 3205 of file AArch64ISelDAGToDAG.cpp.
References llvm::cast(), llvm::AArch64_AM::decodeLogicalImmediate(), llvm::Depth, llvm::APInt::getBitWidth(), and getUsefulBits().
Referenced by getUsefulBitsForUse().
Definition at line 3279 of file AArch64ISelDAGToDAG.cpp.
References llvm::cast(), llvm::Depth, llvm::APInt::flipAllBits(), llvm::APInt::getBitWidth(), and getUsefulBits().
Referenced by getUsefulBitsForUse().
|
static |
Definition at line 3214 of file AArch64ISelDAGToDAG.cpp.
References llvm::Depth, llvm::APInt::getBitWidth(), getUsefulBits(), and llvm::APInt::lshrInPlace().
Referenced by getUsefulBitsFromUBFM().
Definition at line 3251 of file AArch64ISelDAGToDAG.cpp.
References llvm::cast(), llvm::Depth, llvm::AArch64_AM::getShiftType(), llvm::AArch64_AM::getShiftValue(), getUsefulBits(), llvm::AArch64_AM::LSL, and llvm::AArch64_AM::LSR.
Referenced by getUsefulBitsForUse().
Definition at line 3241 of file AArch64ISelDAGToDAG.cpp.
References llvm::cast(), llvm::Depth, and getUsefulBitsFromBitfieldMoveOpd().
Referenced by getUsefulBitsForUse().
|
static |
Returns a copy from WZR or XZR.
This can be used during instruction selection (it does not require any further selection/legalization).
Definition at line 5149 of file AArch64ISelDAGToDAG.cpp.
References assert(), DL, llvm::SelectionDAG::getCopyFromReg(), and llvm::SelectionDAG::getEntryNode().
|
static |
Does DstMask form a complementary pair with the mask provided by BitsToBeInserted, suitable for use in a BFI instruction.
Roughly speaking, this asks whether DstMask zeroes precisely those bits that will be set by the other half.
Definition at line 3173 of file AArch64ISelDAGToDAG.cpp.
References assert(), llvm::BitWidth, llvm::EVT::getSizeInBits(), and llvm::APInt::zextOrTrunc().
Referenced by tryBitfieldInsertOpFromOr().
|
static |
Definition at line 3100 of file AArch64ISelDAGToDAG.cpp.
References llvm::ISD::AND, isBitfieldExtractOpFromAnd(), isBitfieldExtractOpFromSExtInReg(), isBitfieldExtractOpFromShr(), N, Opc, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA, and llvm::ISD::SRL.
Referenced by tryBitfieldInsertOpFromOr().
|
static |
Definition at line 2842 of file AArch64ISelDAGToDAG.cpp.
References llvm::ISD::AND, llvm::ISD::ANY_EXTEND, assert(), llvm::countr_one(), llvm::dbgs(), llvm::SDValue::getNode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::SDValue::getOperand(), llvm::EVT::getSizeInBits(), llvm::SDNode::getValueType(), isOpcWithIntImmediate(), LLVM_DEBUG, llvm::maskTrailingOnes(), N, Opc, llvm::ISD::SRL, llvm::ISD::TRUNCATE, and Widen().
Referenced by isBitfieldExtractOp().
|
static |
Definition at line 2936 of file AArch64ISelDAGToDAG.cpp.
References assert(), llvm::BitWidth, llvm::cast(), llvm::EVT::getSizeInBits(), isOpcWithIntImmediate(), N, Opc, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA, llvm::ISD::SRL, and llvm::ISD::TRUNCATE.
Referenced by isBitfieldExtractOp().
|
static |
Definition at line 3009 of file AArch64ISelDAGToDAG.cpp.
References assert(), llvm::dbgs(), llvm::EVT::getSizeInBits(), llvm::SDNode::getValueType(), llvm::SDValue::getValueType(), isIntImmediate(), isOpcWithIntImmediate(), isSeveralBitsExtractOpFromShr(), LLVM_DEBUG, N, Opc, llvm::ISD::SHL, llvm::ISD::SRA, llvm::ISD::SRL, and llvm::ISD::TRUNCATE.
Referenced by isBitfieldExtractOp().
|
static |
Does this tree qualify as an attempt to move a bitfield into position, essentially "(and (shl VAL, N), Mask)" or (shl VAL, N).
Definition at line 3453 of file AArch64ISelDAGToDAG.cpp.
References llvm::ISD::AND, assert(), llvm::BitWidth, llvm::SelectionDAG::computeKnownBits(), llvm::EVT::getSizeInBits(), isBitfieldPositioningOpFromAnd(), isBitfieldPositioningOpFromShl(), llvm::isShiftedMask_64(), llvm::Known, and llvm::ISD::SHL.
Referenced by tryBitfieldInsertOpFromOr().
|
static |
Definition at line 3483 of file AArch64ISelDAGToDAG.cpp.
References llvm::ISD::AND, llvm::ISD::ANY_EXTEND, assert(), llvm::countr_one(), llvm::countr_zero(), llvm::dbgs(), getLeftShift(), llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueType(), llvm::SDValue::hasOneUse(), isOpcWithIntImmediate(), llvm::isShiftedMask_64(), LLVM_DEBUG, llvm::ISD::SHL, and Widen().
Referenced by isBitfieldPositioningOp().
|
static |
Definition at line 3605 of file AArch64ISelDAGToDAG.cpp.
References assert(), llvm::countr_one(), llvm::countr_zero(), getLeftShift(), isOpcWithIntImmediate(), isSeveralBitsPositioningOpFromShl(), llvm::isShiftedMask_64(), and llvm::ISD::SHL.
Referenced by isBitfieldPositioningOp().
isIntImmediate - This method tests to see if the node is a constant operand.
If so Imm will receive the 64-bit value.
Definition at line 598 of file AArch64ISelDAGToDAG.cpp.
References C(), llvm::dyn_cast(), and N.
Referenced by isBitfieldExtractOpFromShr(), isIntImmediate(), isIntImmediateEq(), isOpcWithIntImmediate(), isOpcWithIntImmediate(), and isSeveralBitsExtractOpFromShr().
Definition at line 608 of file AArch64ISelDAGToDAG.cpp.
References isIntImmediate(), and N.
Definition at line 624 of file AArch64ISelDAGToDAG.cpp.
References isIntImmediate(), and N.
Referenced by isSeveralBitsPositioningOpFromShl().
Definition at line 843 of file AArch64ISelDAGToDAG.cpp.
References llvm::isa(), and N.
Referenced by isWorthFoldingSHL().
Definition at line 615 of file AArch64ISelDAGToDAG.cpp.
References isIntImmediate(), N, and Opc.
Referenced by isBitfieldExtractOpFromAnd(), isBitfieldExtractOpFromSExtInReg(), isBitfieldExtractOpFromShr(), isBitfieldPositioningOpFromAnd(), isBitfieldPositioningOpFromShl(), isSeveralBitsExtractOpFromShr(), isSeveralBitsPositioningOpFromShl(), isWorthFoldingIntoOrrWithShift(), performAddCombineForShiftedOperands(), tryBitfieldInsertOpFromOr(), tryBitfieldInsertOpFromOrAndImm(), and tryOrrWithShift().
|
static |
Definition at line 1533 of file AArch64ISelDAGToDAG.cpp.
|
static |
Definition at line 2969 of file AArch64ISelDAGToDAG.cpp.
References llvm::ISD::AND, isIntImmediate(), llvm::isMask_64(), isOpcWithIntImmediate(), llvm::Log2_64(), N, Opc, and llvm::ISD::SRL.
Referenced by isBitfieldExtractOpFromShr().
|
static |
Definition at line 3573 of file AArch64ISelDAGToDAG.cpp.
References llvm::ISD::AND, assert(), llvm::countr_one(), llvm::SDValue::getNode(), llvm::SDValue::getOperand(), isIntImmediateEq(), llvm::isMask_64(), isOpcWithIntImmediate(), and llvm::ISD::SHL.
Referenced by isBitfieldPositioningOpFromShl().
Definition at line 3637 of file AArch64ISelDAGToDAG.cpp.
References assert(), llvm::isShiftedMask_32(), and llvm::isShiftedMask_64().
Referenced by tryBitfieldInsertOpFromOr(), and tryBitfieldInsertOpFromOrAndImm().
Check if the immediate offset is valid as a scaled immediate.
Definition at line 1258 of file AArch64ISelDAGToDAG.cpp.
References llvm::Log2_32(), llvm::Offset, Range, and Size.
If there's a use of this ADDlow that's not itself a load/store then we'll need to create a real ADD instruction from it anyway and there's no point in folding it into the mem op.
Theoretically, it shouldn't matter, but there's a single pseudo-instruction for an ADRP/ADD pair so over-aggressive folding leads to duplicated ADRP instructions.
Definition at line 1241 of file AArch64ISelDAGToDAG.cpp.
References llvm::ISD::ATOMIC_LOAD, llvm::ISD::ATOMIC_STORE, llvm::cast(), llvm::isStrongerThanMonotonic(), llvm::ISD::LOAD, N, and llvm::ISD::STORE.
|
static |
Definition at line 3734 of file AArch64ISelDAGToDAG.cpp.
References llvm::ISD::AND, assert(), llvm::countr_one(), llvm::countr_zero(), DL, llvm::SelectionDAG::getMachineNode(), llvm::SDValue::getNode(), llvm::SDValue::getOperand(), llvm::AArch64_AM::getShifterImm(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::hasOneUse(), isOpcWithIntImmediate(), llvm::isShiftedMask_64(), llvm::AArch64_AM::LSL, llvm::AArch64_AM::LSR, SDValue(), llvm::ISD::SHL, and llvm::ISD::SRL.
Referenced by tryOrrWithShift().
Determine whether it is worth it to fold SHL into the addressing mode.
Definition at line 849 of file AArch64ISelDAGToDAG.cpp.
References assert(), llvm::dyn_cast(), isMemOpOrPrefetch(), llvm::ISD::SHL, and llvm::SDNode::users().
|
static |
Instructions that accept extend modifiers like UXTW expect the register being extended to be a GPR32, but the incoming DAG might be acting on a GPR64 (either via SEXT_INREG or AND).
Extract the appropriate low bits if this is the case.
Definition at line 1106 of file AArch64ISelDAGToDAG.cpp.
References llvm::SelectionDAG::getTargetExtractSubreg(), and N.
|
static |
NarrowVector - Given a value in the V128 register class, produce the equivalent value in the V64 register class.
Definition at line 2679 of file AArch64ISelDAGToDAG.cpp.
References llvm::EVT::getSimpleVT(), llvm::SelectionDAG::getTargetExtractSubreg(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), and llvm::MVT::getVectorVT().
|
static |
This function selects an opcode from a list of opcodes, which is expected to be the opcode for { 8-bit, 16-bit, 32-bit, 64-bit } element types, in this order.
Definition at line 2096 of file AArch64ISelDAGToDAG.cpp.
References AnyType, FP, llvm::EVT::getVectorElementType(), llvm::EVT::getVectorMinNumElements(), llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key, Int, Int1, llvm::EVT::isScalableVector(), llvm::Offset, and llvm::ArrayRef< T >::size().
Definition at line 2452 of file AArch64ISelDAGToDAG.cpp.
|
static |
Definition at line 3909 of file AArch64ISelDAGToDAG.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::ISD::AND, assert(), llvm::BitWidth, llvm::SelectionDAG::computeKnownBits(), llvm::APInt::countl_zero(), llvm::APInt::countr_zero(), llvm::countr_zero(), DL, llvm::APInt::getBitsSet(), llvm::SelectionDAG::getMachineNode(), llvm::SDValue::getNode(), llvm::SDNode::getOperand(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::getValueType(), llvm::SDValue::hasOneUse(), I, isBitfieldDstMask(), isBitfieldExtractOp(), isBitfieldPositioningOp(), isOpcWithIntImmediate(), isShiftedMask(), llvm::Known, N, Opc, llvm::ISD::OR, llvm::APInt::popcount(), SDValue(), llvm::SelectionDAG::SelectNodeTo(), llvm::ISD::SRL, std::swap(), and tryOrrWithShift().
|
static |
Definition at line 3646 of file AArch64ISelDAGToDAG.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::ISD::AND, assert(), llvm::BitWidth, llvm::SelectionDAG::computeKnownBits(), llvm::countr_one(), DL, llvm::SelectionDAG::getMachineNode(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getTargetConstant(), llvm::AArch64_AM::isLogicalImmediate(), isOpcWithIntImmediate(), isShiftedMask(), llvm::Known, N, Opc, llvm::ISD::OR, llvm::APInt::popcount(), SDValue(), and llvm::SelectionDAG::SelectNodeTo().
|
static |
Definition at line 3809 of file AArch64ISelDAGToDAG.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, llvm::ISD::AND, assert(), DL, llvm::SDValue::getNode(), llvm::SDValue::getOperand(), llvm::AArch64_AM::getShifterImm(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::hasOneUse(), llvm::isMask_64(), isOpcWithIntImmediate(), isWorthFoldingIntoOrrWithShift(), llvm::AArch64_AM::LSL, llvm::AArch64_AM::LSR, N, llvm::ISD::OR, llvm::SelectionDAG::SelectNodeTo(), llvm::ISD::SHL, and llvm::ISD::SRL.
Referenced by tryBitfieldInsertOpFromOr().
|
static |
Definition at line 1414 of file AArch64ISelDAGToDAG.cpp.
References llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getTargetInsertSubreg(), N, and SDValue().
Referenced by llvm::RISCVVType::encodeXSfmmVType(), getAVX512Node(), isBitfieldExtractOpFromAnd(), isBitfieldPositioningOpFromAnd(), optimizeSVEDeinterleavedExtends(), llvm::RISCVInstPrinter::printXSfmmVType(), and llvm::RISCVDAGToDAGISel::selectXSfmmVSET().