LLVM API Documentation

Public Member Functions | Static Public Member Functions
llvm::BuildVectorSDNode Class Reference

#include <SelectionDAGNodes.h>

Inheritance diagram for llvm::BuildVectorSDNode:
Inheritance graph
[legend]
Collaboration diagram for llvm::BuildVectorSDNode:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool isConstantSplat (APInt &SplatValue, APInt &SplatUndef, unsigned &SplatBitSize, bool &HasAnyUndefs, unsigned MinSplatBits=0, bool isBigEndian=false) const
SDValue getSplatValue (BitVector *UndefElements=nullptr) const
 Returns the splatted value or a null value if this is not a splat.
ConstantSDNodegetConstantSplatNode (BitVector *UndefElements=nullptr) const
 Returns the splatted constant or null if this is not a constant splat.
ConstantFPSDNodegetConstantFPSplatNode (BitVector *UndefElements=nullptr) const
 Returns the splatted constant FP or null if this is not a constant FP splat.
bool isConstant () const

Static Public Member Functions

static bool classof (const SDNode *N)

Detailed Description

BuildVectorSDNode - A "pseudo-class" with methods for operating on BUILD_VECTORs.

Definition at line 1593 of file SelectionDAGNodes.h.


Member Function Documentation

static bool llvm::BuildVectorSDNode::classof ( const SDNode N) [inline, static]

Definition at line 1635 of file SelectionDAGNodes.h.

References llvm::ISD::BUILD_VECTOR, and llvm::SDNode::getOpcode().

Returns the splatted constant FP or null if this is not a constant FP splat.

If passed a non-null UndefElements bitvector, it will resize it to match the vector width and set the bits where elements are undef.

Definition at line 6736 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), and getSplatValue().

ConstantSDNode * BuildVectorSDNode::getConstantSplatNode ( BitVector UndefElements = nullptr) const

Returns the splatted constant or null if this is not a constant splat.

If passed a non-null UndefElements bitvector, it will resize it to match the vector width and set the bits where elements are undef.

Definition at line 6730 of file SelectionDAG.cpp.

References llvm::SDValue::getNode(), and getSplatValue().

Referenced by llvm::TargetLowering::isConstFalseVal(), and llvm::TargetLowering::isConstTrueVal().

SDValue BuildVectorSDNode::getSplatValue ( BitVector UndefElements = nullptr) const

Returns the splatted value or a null value if this is not a splat.

If passed a non-null UndefElements bitvector, it will resize it to match the vector width and set the bits where elements are undef.

Definition at line 6702 of file SelectionDAG.cpp.

References llvm::BitVector::clear(), llvm::SDNode::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::BitVector::resize(), and llvm::ISD::UNDEF.

Referenced by getConstantFPSplatNode(), and getConstantSplatNode().

bool BuildVectorSDNode::isConstantSplat ( APInt SplatValue,
APInt SplatUndef,
unsigned SplatBitSize,
bool HasAnyUndefs,
unsigned  MinSplatBits = 0,
bool  isBigEndian = false 
) const

isConstantSplat - Check if this is a constant splat, and if so, find the smallest element size that splats the vector. If MinSplatBits is nonzero, the element size must be at least that large. Note that the splat element may be the entire vector (i.e., a one element vector). Returns the splat element value in SplatValue. Any undefined bits in that value are zero, and the corresponding bits in the SplatUndef mask are set. The SplatBitSize value is set to the splat element size in bits. HasAnyUndefs is set to true if any bits in the vector are undefined. isBigEndian describes the endianness of the target.

Definition at line 6636 of file SelectionDAG.cpp.

References llvm::APInt::getBitsSet(), llvm::SDNode::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), llvm::EVT::getSizeInBits(), llvm::SDNode::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::isVector(), llvm::APInt::lshr(), llvm::APInt::trunc(), llvm::ISD::UNDEF, and llvm::APInt::zextOrTrunc().

Referenced by getVShiftImm(), llvm::PPC::isAllNegativeZeroVector(), isConstantSplatVector(), isVectorAllOnes(), isVSplat(), PerformANDCombine(), performDSPShiftCombine(), PerformORCombine(), resolveBuildVector(), and tryCombineShiftImm().


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