LLVM API Documentation

X86ISelLowering.cpp File Reference

#include "X86.h"
#include "X86InstrBuilder.h"
#include "X86ISelLowering.h"
#include "X86MachineFunctionInfo.h"
#include "X86TargetMachine.h"
#include "llvm/CallingConv.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/GlobalVariable.h"
#include "llvm/Function.h"
#include "llvm/Intrinsics.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/VectorExtras.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/PseudoSourceValue.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Debug.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/CommandLine.h"
#include "X86GenCallingConv.inc"

Include dependency graph for X86ISelLowering.cpp:

Go to the source code of this file.

Functions

static SDValue getMOVLMask (unsigned NumElems, SelectionDAG &DAG)
static void getMaxByValAlign (const Type *Ty, unsigned &MaxAlign)
static unsigned AddLiveIn (MachineFunction &MF, unsigned PReg, const TargetRegisterClass *RC)
static bool CallIsStructReturn (CallSDNode *TheCall)
static bool ArgsAreStructReturn (SDValue Op)
static SDValue CreateCopyOfByValArgument (SDValue Src, SDValue Dst, SDValue Chain, ISD::ArgFlagsTy Flags, SelectionDAG &DAG)
static SDValue EmitTailCallStoreRetAddr (SelectionDAG &DAG, MachineFunction &MF, SDValue Chain, SDValue RetAddrFrIdx, bool Is64Bit, int FPDiff)
static unsigned TranslateX86CC (ISD::CondCode SetCCOpcode, bool isFP, SDValue &LHS, SDValue &RHS, SelectionDAG &DAG)
static bool hasFPCMov (unsigned X86CC)
static bool isUndefOrInRange (SDValue Op, unsigned Low, unsigned Hi)
static bool isUndefOrEqual (SDValue Op, unsigned Val)
template<class SDOperand>
static bool isSHUFPMask (SDOperand *Elems, unsigned NumElems)
template<class SDOperand>
static bool isCommutedSHUFP (SDOperand *Ops, unsigned NumOps)
static bool isCommutedSHUFP (SDNode *N)
template<class SDOperand>
static bool isUNPCKLMask (SDOperand *Elts, unsigned NumElts, bool V2IsSplat=false)
template<class SDOperand>
static bool isUNPCKHMask (SDOperand *Elts, unsigned NumElts, bool V2IsSplat=false)
template<class SDOperand>
static bool isMOVLMask (SDOperand *Elts, unsigned NumElts)
template<class SDOperand>
static bool isCommutedMOVL (SDOperand *Ops, unsigned NumOps, bool V2IsSplat=false, bool V2IsUndef=false)
static bool isCommutedMOVL (SDNode *N, bool V2IsSplat=false, bool V2IsUndef=false)
static bool isIdentityMask (SDNode *N, bool RHS=false)
static bool isSplatMask (SDNode *N)
static SDValue getSplatMaskEltNo (SDNode *N)
static bool isPSHUFHW_PSHUFLWMask (SDNode *N)
static SDValue CommuteVectorShuffle (SDValue Op, SDValue &V1, SDValue &V2, SDValue &Mask, SelectionDAG &DAG)
static SDValue CommuteVectorShuffleMask (SDValue Mask, SelectionDAG &DAG)
static bool ShouldXformToMOVHLPS (SDNode *Mask)
static bool isScalarLoadToVector (SDNode *N, LoadSDNode **LD=NULL)
static bool ShouldXformToMOVLP (SDNode *V1, SDNode *V2, SDNode *Mask)
static bool isSplatVector (SDNode *N)
static bool isUndefShuffle (SDNode *N)
static bool isZeroNode (SDValue Elt)
static bool isZeroShuffle (SDNode *N)
static SDValue getZeroVector (MVT VT, bool HasSSE2, SelectionDAG &DAG)
static SDValue getOnesVector (MVT VT, SelectionDAG &DAG)
static SDValue NormalizeMask (SDValue Mask, SelectionDAG &DAG)
static SDValue getUnpacklMask (unsigned NumElems, SelectionDAG &DAG)
static SDValue getUnpackhMask (unsigned NumElems, SelectionDAG &DAG)
static SDValue getSwapEltZeroMask (unsigned NumElems, unsigned DestElt, SelectionDAG &DAG)
static SDValue PromoteSplat (SDValue Op, SelectionDAG &DAG, bool HasSSE2)
 PromoteSplat - Promote a splat of v4f32, v8i16 or v16i8 to v4i32.
static bool isVectorLoad (SDValue Op)
static SDValue CanonicalizeMovddup (SDValue Op, SDValue V1, SDValue Mask, SelectionDAG &DAG, bool HasSSE3)
static SDValue getShuffleVectorZeroOrUndef (SDValue V2, unsigned Idx, bool isZero, bool HasSSE2, SelectionDAG &DAG)
static unsigned getNumOfConsecutiveZeros (SDValue Op, SDValue Mask, unsigned NumElems, bool Low, SelectionDAG &DAG)
static bool isVectorShift (SDValue Op, SDValue Mask, SelectionDAG &DAG, bool &isLeft, SDValue &ShVal, unsigned &ShAmt)
static SDValue LowerBuildVectorv16i8 (SDValue Op, unsigned NonZeros, unsigned NumNonZero, unsigned NumZero, SelectionDAG &DAG, TargetLowering &TLI)
static SDValue LowerBuildVectorv8i16 (SDValue Op, unsigned NonZeros, unsigned NumNonZero, unsigned NumZero, SelectionDAG &DAG, TargetLowering &TLI)
static SDValue getVShift (bool isLeft, MVT VT, SDValue SrcOp, unsigned NumBits, SelectionDAG &DAG, const TargetLowering &TLI)
static SDValue LowerVECTOR_SHUFFLEv8i16 (SDValue V1, SDValue V2, SDValue PermMask, SelectionDAG &DAG, TargetLowering &TLI)
static SDValue RewriteAsNarrowerShuffle (SDValue V1, SDValue V2, MVT VT, SDValue PermMask, SelectionDAG &DAG, TargetLowering &TLI)
static SDValue getVZextMovL (MVT VT, MVT OpVT, SDValue SrcOp, SelectionDAG &DAG, const X86Subtarget *Subtarget)
static SDValue LowerVECTOR_SHUFFLE_4wide (SDValue V1, SDValue V2, SDValue PermMask, MVT VT, SelectionDAG &DAG)
static SDValue LowerToTLSGeneralDynamicModel32 (GlobalAddressSDNode *GA, SelectionDAG &DAG, const MVT PtrVT)
static SDValue LowerToTLSGeneralDynamicModel64 (GlobalAddressSDNode *GA, SelectionDAG &DAG, const MVT PtrVT)
static SDValue LowerToTLSExecModel (GlobalAddressSDNode *GA, SelectionDAG &DAG, const MVT PtrVT)
static bool isX86LogicalCmp (unsigned Opc)
static bool isAndOrOfSetCCs (SDValue Op, unsigned &Opc)
static bool isXor1OfSetCC (SDValue Op)
static bool isBaseAlignmentOfN (unsigned N, SDNode *Base, const TargetLowering &TLI)
static bool EltsFromConsecutiveLoads (SDNode *N, SDValue PermMask, unsigned NumElems, MVT EVT, SDNode *&Base, SelectionDAG &DAG, MachineFrameInfo *MFI, const TargetLowering &TLI)
static SDValue PerformShuffleCombine (SDNode *N, SelectionDAG &DAG, const TargetLowering &TLI)
static SDValue PerformBuildVectorCombine (SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI, const X86Subtarget *Subtarget, const TargetLowering &TLI)
 PerformBuildVectorCombine - build_vector 0,(load i64 / f64) -> movq / movsd.
static SDValue PerformSELECTCombine (SDNode *N, SelectionDAG &DAG, const X86Subtarget *Subtarget)
 PerformSELECTCombine - Do target-specific dag combines on SELECT nodes.
static SDValue PerformShiftCombine (SDNode *N, SelectionDAG &DAG, const X86Subtarget *Subtarget)
static SDValue PerformSTORECombine (SDNode *N, SelectionDAG &DAG, const X86Subtarget *Subtarget)
 PerformSTORECombine - Do target-specific dag combines on STORE nodes.
static SDValue PerformFORCombine (SDNode *N, SelectionDAG &DAG)
static SDValue PerformFANDCombine (SDNode *N, SelectionDAG &DAG)
 PerformFANDCombine - Do target-specific dag combines on X86ISD::FAND nodes.
static SDValue PerformBTCombine (SDNode *N, SelectionDAG &DAG, TargetLowering::DAGCombinerInfo &DCI)

Variables

static cl::opt< bool > DisableMMX ("disable-mmx", cl::Hidden, cl::desc("Disable use of MMX"))


Function Documentation

static unsigned AddLiveIn ( MachineFunction &  MF,
unsigned  PReg,
const TargetRegisterClass *  RC 
) [static]

AddLiveIn - This helper function adds the specified physical register to the MachineFunction as a live in value. It also creates a corresponding virtual register for it.

Definition at line 1096 of file X86ISelLowering.cpp.

References llvm::MachineRegisterInfo::addLiveIn(), llvm::TargetRegisterClass::contains(), llvm::MachineRegisterInfo::createVirtualRegister(), and llvm::MachineFunction::getRegInfo().

static bool ArgsAreStructReturn ( SDValue  Op  )  [static]

ArgsAreStructReturn - Determines whether a FORMAL_ARGUMENTS node uses struct return semantics.

Definition at line 1116 of file X86ISelLowering.cpp.

References llvm::SDValue::getNode(), llvm::SDNode::getNumValues(), and llvm::SDValue::getOperand().

static bool CallIsStructReturn ( CallSDNode *  TheCall  )  [static]

CallIsStructReturn - Determines whether a CALL node uses struct return semantics.

Definition at line 1106 of file X86ISelLowering.cpp.

References llvm::CallSDNode::getArgFlags(), llvm::CallSDNode::getNumArgs(), and llvm::ISD::ArgFlagsTy::isSRet().

static SDValue CanonicalizeMovddup ( SDValue  Op,
SDValue  V1,
SDValue  Mask,
SelectionDAG &  DAG,
bool  HasSSE3 
) [static]

static SDValue CommuteVectorShuffle ( SDValue  Op,
SDValue &  V1,
SDValue &  V2,
SDValue &  Mask,
SelectionDAG &  DAG 
) [static]

static SDValue CommuteVectorShuffleMask ( SDValue  Mask,
SelectionDAG &  DAG 
) [static]

static SDValue CreateCopyOfByValArgument ( SDValue  Src,
SDValue  Dst,
SDValue  Chain,
ISD::ArgFlagsTy  Flags,
SelectionDAG &  DAG 
) [static]

CreateCopyOfByValArgument - Make a copy of an aggregate at address specified by "Src" to address "Dst" with size and alignment information specified by the specific parameter attribute. The copy will be passed as a byval function parameter.

Definition at line 1198 of file X86ISelLowering.cpp.

References llvm::ISD::ArgFlagsTy::getByValAlign(), llvm::ISD::ArgFlagsTy::getByValSize(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getMemcpy(), and llvm::MVT::i32.

static bool EltsFromConsecutiveLoads ( SDNode *  N,
SDValue  PermMask,
unsigned  NumElems,
MVT  EVT,
SDNode *&  Base,
SelectionDAG &  DAG,
MachineFrameInfo *  MFI,
const TargetLowering &  TLI 
) [static]

static SDValue EmitTailCallStoreRetAddr ( SelectionDAG &  DAG,
MachineFunction &  MF,
SDValue  Chain,
SDValue  RetAddrFrIdx,
bool  Is64Bit,
int  FPDiff 
) [static]

EmitTailCallStoreRetAddr - Emit a store of the return adress if tail call optimization is performed and it is required (FPDiff!=0).

Definition at line 1511 of file X86ISelLowering.cpp.

References llvm::MachineFrameInfo::CreateFixedObject(), llvm::PseudoSourceValue::getFixedStack(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getStore(), llvm::MVT::i32, and llvm::MVT::i64.

static void getMaxByValAlign ( const Type *  Ty,
unsigned &  MaxAlign 
) [static]

getMaxByValAlign - Helper for getByValTypeAlignment to determine the desired ByVal argument alignment.

Definition at line 833 of file X86ISelLowering.cpp.

Referenced by llvm::X86TargetLowering::getByValTypeAlignment().

static SDValue getMOVLMask ( unsigned  NumElems,
SelectionDAG &  DAG 
) [static]

static unsigned getNumOfConsecutiveZeros ( SDValue  Op,
SDValue  Mask,
unsigned  NumElems,
bool  Low,
SelectionDAG &  DAG 
) [static]

getNumOfConsecutiveZeros - Return the number of elements in a result of a shuffle that is zero.

Definition at line 3120 of file X86ISelLowering.cpp.

References llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SelectionDAG::getShuffleScalarElt(), Idx, Index, isZeroNode(), and llvm::ISD::UNDEF.

Referenced by isVectorShift().

static SDValue getOnesVector ( MVT  VT,
SelectionDAG &  DAG 
) [static]

static SDValue getShuffleVectorZeroOrUndef ( SDValue  V2,
unsigned  Idx,
bool  isZero,
bool  HasSSE2,
SelectionDAG &  DAG 
) [static]

getShuffleVectorZeroOrUndef - Return a vector_shuffle of the specified vector of zero or undef vector. This produces a shuffle where the low element of V2 is swizzled into the zero/undef vector, landing at element Idx. This produces a shuffle mask like 4,1,2,3 (idx=0) or 0,1,2,4 (idx=3).

Definition at line 3097 of file X86ISelLowering.cpp.

References llvm::ISD::BUILD_VECTOR, llvm::SelectionDAG::getConstant(), llvm::MVT::getIntVectorWithNumElements(), llvm::SelectionDAG::getNode(), llvm::SDValue::getValueType(), llvm::MVT::getVectorElementType(), llvm::MVT::getVectorNumElements(), getZeroVector(), llvm::SmallVectorImpl< T >::push_back(), llvm::SmallVectorImpl< T >::size(), llvm::ISD::UNDEF, V1, and llvm::ISD::VECTOR_SHUFFLE.

static SDValue getSplatMaskEltNo ( SDNode *  N  )  [static]

getSplatMaskEltNo - Given a splat mask, return the index to the element we want to splat.

Definition at line 2564 of file X86ISelLowering.cpp.

References llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), and llvm::X86::isSplatMask().

Referenced by PromoteSplat().

static SDValue getSwapEltZeroMask ( unsigned  NumElems,
unsigned  DestElt,
SelectionDAG &  DAG 
) [static]

getSwapEltZeroMask - Returns a vector_shuffle mask for a shuffle that swaps element #0 of a vector with the specified index, leaving the rest of the elements in place.

Definition at line 3005 of file X86ISelLowering.cpp.

References llvm::ISD::BUILD_VECTOR, llvm::SelectionDAG::getConstant(), llvm::MVT::getIntVectorWithNumElements(), llvm::SelectionDAG::getNode(), llvm::MVT::getVectorElementType(), llvm::SmallVectorImpl< T >::push_back(), and llvm::SmallVectorImpl< T >::size().

static SDValue getUnpackhMask ( unsigned  NumElems,
SelectionDAG &  DAG 
) [static]

static SDValue getUnpacklMask ( unsigned  NumElems,
SelectionDAG &  DAG 
) [static]

static SDValue getVShift ( bool  isLeft,
MVT  VT,
SDValue  SrcOp,
unsigned  NumBits,
SelectionDAG &  DAG,
const TargetLowering &  TLI 
) [static]

static SDValue getVZextMovL ( MVT  VT,
MVT  OpVT,
SDValue  SrcOp,
SelectionDAG &  DAG,
const X86Subtarget *  Subtarget 
) [static]

static SDValue getZeroVector ( MVT  VT,
bool  HasSSE2,
SelectionDAG &  DAG 
) [static]

static bool hasFPCMov ( unsigned  X86CC  )  [static]

hasFPCMov - is there a floating point cmov for the specific X86 condition code. Current x86 isa includes the following FP cmov instructions: fcmovb, fcomvbe, fcomve, fcmovu, fcmovae, fcmova, fcmovne, fcmovnu.

Definition at line 2073 of file X86ISelLowering.cpp.

References llvm::X86::COND_A, llvm::X86::COND_AE, llvm::X86::COND_B, llvm::X86::COND_BE, llvm::X86::COND_E, llvm::X86::COND_NE, llvm::X86::COND_NP, and llvm::X86::COND_P.

static bool isAndOrOfSetCCs ( SDValue  Op,
unsigned &  Opc 
) [static]

static bool isBaseAlignmentOfN ( unsigned  N,
SDNode *  Base,
const TargetLowering &  TLI 
) [static]

static bool isCommutedMOVL ( SDNode *  N,
bool  V2IsSplat = false,
bool  V2IsUndef = false 
) [static]

template<class SDOperand>
static bool isCommutedMOVL ( SDOperand *  Ops,
unsigned  NumOps,
bool  V2IsSplat = false,
bool  V2IsUndef = false 
) [inline, static]

isCommutedMOVL - Returns true if the shuffle mask is except the reverse of what x86 movss want. X86 movs requires the lowest element to be lowest element of vector 2 and the other elements to come from vector 1 in order.

Definition at line 2431 of file X86ISelLowering.cpp.

References isUndefOrEqual(), and isUndefOrInRange().

Referenced by isCommutedMOVL(), and llvm::X86TargetLowering::isVectorClearMaskLegal().

static bool isCommutedSHUFP ( SDNode *  N  )  [static]

template<class SDOperand>
static bool isCommutedSHUFP ( SDOperand *  Ops,
unsigned  NumOps 
) [inline, static]

isCommutedSHUFP - Returns true if the shuffle mask is exactly the reverse of what x86 shuffles want. x86 shuffles requires the lower half elements to come from vector 1 (which would equal the dest.) and the upper half to come from vector 2.

Definition at line 2205 of file X86ISelLowering.cpp.

References isUndefOrInRange().

Referenced by isCommutedSHUFP(), and llvm::X86TargetLowering::isVectorClearMaskLegal().

static bool isIdentityMask ( SDNode *  N,
bool  RHS = false 
) [static]

isIdentityMask - Return true if the specified VECTOR_SHUFFLE operand specifies a identity operation on the LHS or RHS.

Definition at line 2522 of file X86ISelLowering.cpp.

References llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), isUndefOrEqual(), and RHS.

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

template<class SDOperand>
static bool isMOVLMask ( SDOperand *  Elts,
unsigned  NumElts 
) [inline, static]

isMOVLMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVSS, MOVSD, and MOVD, i.e. setting the lowest element.

Definition at line 2407 of file X86ISelLowering.cpp.

References isUndefOrEqual().

Referenced by llvm::X86::isMOVLMask(), and llvm::X86TargetLowering::isVectorClearMaskLegal().

static bool isPSHUFHW_PSHUFLWMask ( SDNode *  N  )  [static]

isPSHUFHW_PSHUFLWMask - true if the specified VECTOR_SHUFFLE operand specifies a 8 element shuffle that can be broken into a pair of PSHUFHW and PSHUFLW.

Definition at line 2678 of file X86ISelLowering.cpp.

References llvm::ISD::BUILD_VECTOR, llvm::SDNode::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), and llvm::ISD::UNDEF.

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

static bool isScalarLoadToVector ( SDNode *  N,
LoadSDNode **  LD = NULL 
) [static]

isScalarLoadToVector - Returns true if the node is a scalar load that is promoted to a vector. It also returns the LoadSDNode by reference if required.

Definition at line 2782 of file X86ISelLowering.cpp.

References llvm::SDValue::getNode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::ISD::isNON_EXTLoad(), and llvm::ISD::SCALAR_TO_VECTOR.

Referenced by getVZextMovL(), and ShouldXformToMOVLP().

template<class SDOperand>
static bool isSHUFPMask ( SDOperand *  Elems,
unsigned  NumElems 
) [inline, static]

isSHUFPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to SHUFP*.

Definition at line 2181 of file X86ISelLowering.cpp.

References isUndefOrInRange().

Referenced by llvm::X86::isSHUFPMask(), and llvm::X86TargetLowering::isVectorClearMaskLegal().

static bool isSplatMask ( SDNode *  N  )  [static]

isSplatMask - Return true if the specified VECTOR_SHUFFLE operand specifies a splat of a single element.

Definition at line 2532 of file X86ISelLowering.cpp.

References llvm::ISD::BUILD_VECTOR, llvm::SDValue::getNode(), llvm::SDNode::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), and llvm::ISD::UNDEF.

Referenced by llvm::X86TargetLowering::isShuffleMaskLegal(), llvm::X86::isSplatMask(), and PerformShiftCombine().

static bool isSplatVector ( SDNode *  N  )  [static]

isSplatVector - Returns true if N is a BUILD_VECTOR node whose elements are all the same.

Definition at line 2820 of file X86ISelLowering.cpp.

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

static bool isUndefOrEqual ( SDValue  Op,
unsigned  Val 
) [static]

static bool isUndefOrInRange ( SDValue  Op,
unsigned  Low,
unsigned  Hi 
) [static]

isUndefOrInRange - Op is either an undef node or a ConstantSDNode. Return true if Op is undef or if its value falls within the specified range (L, H].

Definition at line 2091 of file X86ISelLowering.cpp.

References llvm::SDValue::getOpcode(), and llvm::ISD::UNDEF.

Referenced by isCommutedMOVL(), isCommutedSHUFP(), llvm::X86::isPSHUFLWMask(), and isSHUFPMask().

static bool isUndefShuffle ( SDNode *  N  )  [static]

isUndefShuffle - Returns true if N is a VECTOR_SHUFFLE that can be resolved to an undef.

Definition at line 2833 of file X86ISelLowering.cpp.

References llvm::SDValue::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::ISD::UNDEF, V1, and llvm::ISD::VECTOR_SHUFFLE.

template<class SDOperand>
static bool isUNPCKHMask ( SDOperand *  Elts,
unsigned  NumElts,
bool  V2IsSplat = false 
) [inline, static]

isUNPCKHMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to UNPCKH.

Definition at line 2330 of file X86ISelLowering.cpp.

References isUndefOrEqual().

Referenced by llvm::X86::isUNPCKHMask().

template<class SDOperand>
static bool isUNPCKLMask ( SDOperand *  Elts,
unsigned  NumElts,
bool  V2IsSplat = false 
) [inline, static]

isUNPCKLMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to UNPCKL.

Definition at line 2300 of file X86ISelLowering.cpp.

References isUndefOrEqual().

Referenced by llvm::X86::isUNPCKLMask().

static bool isVectorLoad ( SDValue  Op  )  [static]

isVectorLoad - Returns true if the node is a vector load, a scalar load that's promoted to vector, or a load bitcasted.

Definition at line 3055 of file X86ISelLowering.cpp.

References llvm::ISD::BIT_CONVERT, llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::getValueType(), llvm::MVT::isVector(), and llvm::ISD::SCALAR_TO_VECTOR.

Referenced by CanonicalizeMovddup().

static bool isVectorShift ( SDValue  Op,
SDValue  Mask,
SelectionDAG &  DAG,
bool &  isLeft,
SDValue &  ShVal,
unsigned &  ShAmt 
) [static]

isVectorShift - Returns true if the shuffle can be implemented as a logical left or right shift of a vector.

Definition at line 3142 of file X86ISelLowering.cpp.

References getNumOfConsecutiveZeros(), llvm::SDValue::getNumOperands(), llvm::SDValue::getOperand(), Idx, Index, and llvm::ISD::UNDEF.

static bool isX86LogicalCmp ( unsigned  Opc  )  [static]

Definition at line 5307 of file X86ISelLowering.cpp.

References llvm::X86ISD::CMP, llvm::X86ISD::COMI, and llvm::X86ISD::UCOMI.

static bool isXor1OfSetCC ( SDValue  Op  )  [static]

static bool isZeroNode ( SDValue  Elt  )  [inline, static]

isZeroNode - Returns true if Elt is a constant zero or a floating point constant +0.0.

Definition at line 2856 of file X86ISelLowering.cpp.

Referenced by getNumOfConsecutiveZeros(), isZeroShuffle(), and PerformBuildVectorCombine().

static bool isZeroShuffle ( SDNode *  N  )  [static]

static SDValue LowerBuildVectorv16i8 ( SDValue  Op,
unsigned  NonZeros,
unsigned  NumNonZero,
unsigned  NumZero,
SelectionDAG &  DAG,
TargetLowering &  TLI 
) [static]

static SDValue LowerBuildVectorv8i16 ( SDValue  Op,
unsigned  NonZeros,
unsigned  NumNonZero,
unsigned  NumZero,
SelectionDAG &  DAG,
TargetLowering &  TLI 
) [static]

static SDValue LowerToTLSExecModel ( GlobalAddressSDNode *  GA,
SelectionDAG &  DAG,
const MVT  PtrVT 
) [static]

static SDValue LowerToTLSGeneralDynamicModel32 ( GlobalAddressSDNode *  GA,
SelectionDAG &  DAG,
const MVT  PtrVT 
) [static]

static SDValue LowerToTLSGeneralDynamicModel64 ( GlobalAddressSDNode *  GA,
SelectionDAG &  DAG,
const MVT  PtrVT 
) [static]

static SDValue LowerVECTOR_SHUFFLE_4wide ( SDValue  V1,
SDValue  V2,
SDValue  PermMask,
MVT  VT,
SelectionDAG &  DAG 
) [static]

static SDValue LowerVECTOR_SHUFFLEv8i16 ( SDValue  V1,
SDValue  V2,
SDValue  PermMask,
SelectionDAG &  DAG,
TargetLowering &  TLI 
) [static]

static SDValue NormalizeMask ( SDValue  Mask,
SelectionDAG &  DAG 
) [static]

static SDValue PerformBTCombine ( SDNode *  N,
SelectionDAG &  DAG,
TargetLowering::DAGCombinerInfo &  DCI 
) [static]

static SDValue PerformBuildVectorCombine ( SDNode *  N,
SelectionDAG &  DAG,
TargetLowering::DAGCombinerInfo &  DCI,
const X86Subtarget *  Subtarget,
const TargetLowering &  TLI 
) [static]

static SDValue PerformFANDCombine ( SDNode *  N,
SelectionDAG &  DAG 
) [static]

PerformFANDCombine - Do target-specific dag combines on X86ISD::FAND nodes.

Definition at line 7941 of file X86ISelLowering.cpp.

References llvm::SDNode::getOperand().

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

static SDValue PerformFORCombine ( SDNode *  N,
SelectionDAG &  DAG 
) [static]

PerformFORCombine - Do target-specific dag combines on X86ISD::FOR and X86ISD::FXOR nodes.

Definition at line 7927 of file X86ISelLowering.cpp.

References llvm::X86ISD::FOR, llvm::X86ISD::FXOR, llvm::SDNode::getOpcode(), and llvm::SDNode::getOperand().

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

static SDValue PerformSELECTCombine ( SDNode *  N,
SelectionDAG &  DAG,
const X86Subtarget *  Subtarget 
) [static]

static SDValue PerformShiftCombine ( SDNode *  N,
SelectionDAG &  DAG,
const X86Subtarget *  Subtarget 
) [static]

static SDValue PerformShuffleCombine ( SDNode *  N,
SelectionDAG &  DAG,
const TargetLowering &  TLI 
) [static]

static SDValue PerformSTORECombine ( SDNode *  N,
SelectionDAG &  DAG,
const X86Subtarget *  Subtarget 
) [static]

static SDValue PromoteSplat ( SDValue  Op,
SelectionDAG &  DAG,
bool  HasSSE2 
) [static]

static SDValue RewriteAsNarrowerShuffle ( SDValue  V1,
SDValue  V2,
MVT  VT,
SDValue  PermMask,
SelectionDAG &  DAG,
TargetLowering &  TLI 
) [static]

RewriteAsNarrowerShuffle - Try rewriting v8i16 and v16i8 shuffles as 4 wide ones, or rewriting v4i32 / v2f32 as 2 wide ones if possible. This can be done when every pair / quad of shuffle mask elements point to elements in the right sequence. e.g. vector_shuffle <>, <>, < 3, 4, | 10, 11, | 0, 1, | 14, 15>

Definition at line 3772 of file X86ISelLowering.cpp.

References llvm::ISD::BIT_CONVERT, llvm::ISD::BUILD_VECTOR, llvm::SelectionDAG::getConstant(), llvm::MVT::getIntVectorWithNumElements(), llvm::SelectionDAG::getNode(), llvm::SDValue::getNumOperands(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::MVT::getSimpleVT(), llvm::MVT::getVectorElementType(), llvm::MVT::isInteger(), llvm::SmallVectorImpl< T >::push_back(), Scale, llvm::SmallVectorImpl< T >::size(), llvm::ISD::UNDEF, llvm::MVT::v16i8, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v4f32, llvm::MVT::v4i32, llvm::MVT::v8i16, and llvm::ISD::VECTOR_SHUFFLE.

static bool ShouldXformToMOVHLPS ( SDNode *  Mask  )  [static]

ShouldXformToMOVHLPS - Return true if the node should be transformed to match movhlps. The lower half elements should come from upper half of V1 (and in order), and the upper half elements should come from the upper half of V2 (and in order).

Definition at line 2766 of file X86ISelLowering.cpp.

References llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), and isUndefOrEqual().

static bool ShouldXformToMOVLP ( SDNode *  V1,
SDNode *  V2,
SDNode *  Mask 
) [static]

ShouldXformToMOVLP{S|D} - Return true if the node should be transformed to match movlp{s|d}. The lower half elements should come from lower half of V1 (and in order), and the upper half elements should come from the upper half of V2 (and in order). And since V1 will become the source of the MOVLP, it must be either a vector load or a scalar load to vector.

Definition at line 2798 of file X86ISelLowering.cpp.

References llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), llvm::ISD::isNON_EXTLoad(), isScalarLoadToVector(), and isUndefOrEqual().

static unsigned TranslateX86CC ( ISD::CondCode  SetCCOpcode,
bool  isFP,
SDValue &  LHS,
SDValue &  RHS,
SelectionDAG &  DAG 
) [static]


Variable Documentation

cl::opt<bool> DisableMMX("disable-mmx", cl::Hidden, cl::desc("Disable use of MMX")) [static]