LLVM  12.0.0git
Macros | Functions
LegalizeVectorTypes.cpp File Reference
#include "LegalizeTypes.h"
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/TypeSize.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/IR/ConstrainedOps.def"
Include dependency graph for LegalizeVectorTypes.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "legalize-types"
 
#define DAG_INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC, DAGN)   case ISD::STRICT_##DAGN:
 
#define DAG_INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC, DAGN)   case ISD::STRICT_##DAGN:
 
#define DAG_INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC, DAGN)   case ISD::STRICT_##DAGN:
 

Functions

static SDValue CollectOpsToWiden (SelectionDAG &DAG, const TargetLowering &TLI, SmallVectorImpl< SDValue > &ConcatOps, unsigned ConcatEnd, EVT VT, EVT MaxVT, EVT WidenVT)
 
static bool isSETCCOp (unsigned Opcode)
 
static bool isLogicalMaskOp (unsigned Opcode)
 
static EVT getSETCCOperandType (SDValue N)
 
static bool isSETCCorConvertedSETCC (SDValue N)
 
static EVT FindMemType (SelectionDAG &DAG, const TargetLowering &TLI, unsigned Width, EVT WidenVT, unsigned Align=0, unsigned WidenEx=0)
 
static SDValue BuildVectorFromScalar (SelectionDAG &DAG, EVT VecTy, SmallVectorImpl< SDValue > &LdOps, unsigned Start, unsigned End)
 

Macro Definition Documentation

◆ DAG_INSTRUCTION [1/3]

#define DAG_INSTRUCTION (   NAME,
  NARG,
  ROUND_MODE,
  INTRINSIC,
  DAGN 
)    case ISD::STRICT_##DAGN:

◆ DAG_INSTRUCTION [2/3]

#define DAG_INSTRUCTION (   NAME,
  NARG,
  ROUND_MODE,
  INTRINSIC,
  DAGN 
)    case ISD::STRICT_##DAGN:

◆ DAG_INSTRUCTION [3/3]

#define DAG_INSTRUCTION (   NAME,
  NARG,
  ROUND_MODE,
  INTRINSIC,
  DAGN 
)    case ISD::STRICT_##DAGN:

◆ DEBUG_TYPE

#define DEBUG_TYPE   "legalize-types"

Definition at line 30 of file LegalizeVectorTypes.cpp.

Function Documentation

◆ BuildVectorFromScalar()

static SDValue BuildVectorFromScalar ( SelectionDAG DAG,
EVT  VecTy,
SmallVectorImpl< SDValue > &  LdOps,
unsigned  Start,
unsigned  End 
)
static

Definition at line 4867 of file LegalizeVectorTypes.cpp.

◆ CollectOpsToWiden()

static SDValue CollectOpsToWiden ( SelectionDAG DAG,
const TargetLowering TLI,
SmallVectorImpl< SDValue > &  ConcatOps,
unsigned  ConcatEnd,
EVT  VT,
EVT  MaxVT,
EVT  WidenVT 
)
static

Definition at line 2936 of file LegalizeVectorTypes.cpp.

References llvm::ISD::ANY_EXTEND, llvm::ISD::ANY_EXTEND_VECTOR_INREG, assert(), llvm::ISD::BITCAST, llvm::EVT::bitsEq(), llvm::TargetLoweringBase::canOpTrap(), llvm::ISD::CONCAT_VECTORS, llvm::SmallVectorTemplateCommon< T >::data(), DL, llvm::numbers::e, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::MaskedLoadStoreSDNode::getAddressingMode(), llvm::MaskedLoadSDNode::getBasePtr(), llvm::MaskedGatherScatterSDNode::getBasePtr(), llvm::SelectionDAG::getBuildVector(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getDataLayout(), llvm::LoadSDNode::getExtensionType(), llvm::MaskedLoadSDNode::getExtensionType(), llvm::SDNode::getFlags(), llvm::MaskedGatherScatterSDNode::getIndex(), llvm::MaskedGatherScatterSDNode::getIndexType(), llvm::MaskedLoadSDNode::getMask(), llvm::MaskedGatherScatterSDNode::getMask(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedLoad(), llvm::MemSDNode::getMemOperand(), llvm::MemSDNode::getMemoryVT(), llvm::SelectionDAG::getNode(), llvm::SDNode::getNumOperands(), llvm::MaskedLoadSDNode::getOffset(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::MaskedLoadSDNode::getPassThru(), llvm::MaskedGatherSDNode::getPassThru(), llvm::EVT::getScalarType(), llvm::MaskedGatherScatterSDNode::getScale(), llvm::TargetLoweringBase::getShiftAmountTy(), llvm::EVT::getSizeInBits(), llvm::TargetLoweringBase::getTypeToTransformTo(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::SDNode::getValueType(), llvm::EVT::getVectorElementType(), llvm::SelectionDAG::getVectorIdxConstant(), llvm::EVT::getVectorNumElements(), llvm::SelectionDAG::getVectorShuffle(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::ISD::INSERT_SUBVECTOR, llvm::ISD::INSERT_VECTOR_ELT, llvm::DataLayout::isBigEndian(), llvm::EVT::isByteSized(), llvm::MaskedLoadSDNode::isExpandingLoad(), llvm::TargetLoweringBase::isTypeLegal(), llvm::SDValue::isUndef(), llvm::EVT::isVector(), llvm_unreachable, llvm::makeArrayRef(), llvm::BitmaskEnumDetail::Mask(), llvm::min(), N, llvm::ISD::NON_EXTLOAD, llvm::SDNode::op_begin(), llvm::SDNode::op_end(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::report_fatal_error(), llvm::ISD::SCALAR_TO_VECTOR, llvm::TargetLowering::scalarizeVectorLoad(), llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_VECTOR_INREG, llvm::SmallVectorBase< SmallVectorSizeType< T > >::size(), llvm::ISD::STRICT_FP_EXTEND, llvm::ISD::STRICT_FP_ROUND, llvm::ISD::STRICT_FP_TO_SINT, llvm::ISD::STRICT_FP_TO_UINT, llvm::ISD::STRICT_FSETCC, llvm::ISD::STRICT_FSETCCS, llvm::ISD::STRICT_SINT_TO_FP, llvm::ISD::STRICT_UINT_TO_FP, llvm::ISD::TokenFactor, llvm::TargetLoweringBase::TypeExpandFloat, llvm::TargetLoweringBase::TypeExpandInteger, llvm::TargetLoweringBase::TypeLegal, llvm::TargetLoweringBase::TypePromoteFloat, llvm::TargetLoweringBase::TypePromoteInteger, llvm::TargetLoweringBase::TypeScalarizeScalableVector, llvm::TargetLoweringBase::TypeScalarizeVector, llvm::TargetLoweringBase::TypeSoftenFloat, llvm::TargetLoweringBase::TypeSoftPromoteHalf, llvm::TargetLoweringBase::TypeSplitVector, llvm::TargetLoweringBase::TypeWidenVector, llvm::SelectionDAG::UnrollVectorOp(), llvm::MVT::x86mmx, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZERO_EXTEND_VECTOR_INREG.

◆ FindMemType()

static EVT FindMemType ( SelectionDAG DAG,
const TargetLowering TLI,
unsigned  Width,
EVT  WidenVT,
unsigned  Align = 0,
unsigned  WidenEx = 0 
)
static

◆ getSETCCOperandType()

static EVT getSETCCOperandType ( SDValue  N)
inlinestatic

◆ isLogicalMaskOp()

static bool isLogicalMaskOp ( unsigned  Opcode)
inlinestatic

Definition at line 3837 of file LegalizeVectorTypes.cpp.

References llvm::ISD::AND, llvm::ISD::OR, and llvm::ISD::XOR.

Referenced by isSETCCorConvertedSETCC().

◆ isSETCCOp()

static bool isSETCCOp ( unsigned  Opcode)
inlinestatic

◆ isSETCCorConvertedSETCC()

static bool isSETCCorConvertedSETCC ( SDValue  N)
inlinestatic

Definition at line 3857 of file LegalizeVectorTypes.cpp.

References llvm::ISD::ANY_EXTEND, llvm::ISD::ANY_EXTEND_VECTOR_INREG, assert(), llvm::ISD::BITCAST, llvm::EVT::changeVectorElementTypeToInteger(), llvm::ISD::CONCAT_VECTORS, Cond, llvm::dbgs(), DL, llvm::SDNode::dump(), llvm::numbers::e, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::ISD::FCOPYSIGN, llvm::MVT::FIRST_VECTOR_VALUETYPE, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::MaskedLoadStoreSDNode::getAddressingMode(), llvm::SelectionDAG::getAllOnesConstant(), llvm::MaskedStoreSDNode::getBasePtr(), llvm::MaskedGatherScatterSDNode::getBasePtr(), llvm::SelectionDAG::getBoolConstant(), llvm::TargetLoweringBase::getBooleanContents(), llvm::SelectionDAG::getBuildVector(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantFP(), llvm::SelectionDAG::getContext(), llvm::TargetLoweringBase::getExtendForContent(), llvm::SDNode::getFlags(), llvm::EVT::getHalfNumVectorElementsVT(), llvm::MaskedGatherScatterSDNode::getIndex(), llvm::MaskedGatherScatterSDNode::getIndexType(), llvm::MaskedStoreSDNode::getMask(), llvm::MaskedGatherScatterSDNode::getMask(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedScatter(), llvm::SelectionDAG::getMaskedStore(), llvm::ShuffleVectorSDNode::getMaskElt(), llvm::MemSDNode::getMemOperand(), llvm::MemSDNode::getMemoryVT(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getNumOperands(), llvm::SDNode::getNumValues(), llvm::MaskedStoreSDNode::getOffset(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::EVT::getScalarSizeInBits(), llvm::EVT::getScalarType(), llvm::MaskedGatherScatterSDNode::getScale(), llvm::SelectionDAG::getSelect(), getSETCCOperandType(), llvm::APInt::getSignedMaxValue(), llvm::APInt::getSignedMinValue(), llvm::EVT::getSizeInBits(), llvm::TargetLoweringBase::getTypeAction(), llvm::TargetLoweringBase::getTypeToTransformTo(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::MaskedStoreSDNode::getValue(), llvm::MaskedScatterSDNode::getValue(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::EVT::getVectorElementType(), llvm::SelectionDAG::getVectorIdxConstant(), llvm::EVT::getVectorNumElements(), llvm::SelectionDAG::getVectorShuffle(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::MVT::i1, llvm::ISD::INSERT_SUBVECTOR, llvm::ISD::INSERT_VECTOR_ELT, llvm::ISD::isBuildVectorOfConstantSDNodes(), llvm::EVT::isByteSized(), llvm::MaskedStoreSDNode::isCompressingStore(), llvm::EVT::isInteger(), isLogicalMaskOp(), llvm::EVT::isPow2VectorType(), llvm::isPowerOf2_64(), isSETCCOp(), llvm::SDNode::isStrictFPOpcode(), llvm::StoreSDNode::isTruncatingStore(), llvm::TargetLoweringBase::isTypeLegal(), llvm::SDValue::isUndef(), llvm::SDNode::isUndef(), llvm::EVT::isVector(), llvm::MVT::LAST_VECTOR_VALUETYPE, LLVM_DEBUG, llvm_unreachable, llvm::BitmaskEnumDetail::Mask(), llvm::ISD::MGATHER, llvm::ISD::MSCATTER, llvm::ISD::MSTORE, N, llvm::SDNode::op_begin(), llvm::SDNode::op_end(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::TargetLowering::scalarizeVectorStore(), llvm::MCID::Select, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_VECTOR_INREG, llvm::ISD::SINT_TO_FP, Size, llvm::SmallVectorBase< SmallVectorSizeType< T > >::size(), llvm::ARM_MB::ST, llvm::ISD::STORE, llvm::ISD::STRICT_FP_EXTEND, llvm::ISD::STRICT_FP_ROUND, llvm::ISD::STRICT_FP_TO_SINT, llvm::ISD::STRICT_FP_TO_UINT, llvm::ISD::STRICT_FSETCC, llvm::ISD::STRICT_FSETCCS, llvm::ISD::STRICT_SINT_TO_FP, llvm::ISD::STRICT_UINT_TO_FP, llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::TargetLoweringBase::TypeLegal, llvm::TargetLoweringBase::TypeSplitVector, llvm::TargetLoweringBase::TypeWidenVector, llvm::ISD::UINT_TO_FP, llvm::SelectionDAG::UnrollVectorOp(), llvm::ISD::VECREDUCE_ADD, llvm::ISD::VECREDUCE_AND, llvm::ISD::VECREDUCE_FADD, llvm::ISD::VECREDUCE_FMAX, llvm::ISD::VECREDUCE_FMIN, llvm::ISD::VECREDUCE_FMUL, llvm::ISD::VECREDUCE_MUL, llvm::ISD::VECREDUCE_OR, llvm::ISD::VECREDUCE_SMAX, llvm::ISD::VECREDUCE_SMIN, llvm::ISD::VECREDUCE_UMAX, llvm::ISD::VECREDUCE_UMIN, llvm::ISD::VECREDUCE_XOR, llvm::ISD::VSELECT, llvm::SelectionDAG::WidenVector(), llvm::MVT::x86mmx, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZERO_EXTEND_VECTOR_INREG.