LLVM API Documentation

PPCISelLowering.cpp File Reference

#include "PPCISelLowering.h"
#include "PPCTargetMachine.h"
#include "PPCPerfectShuffle.h"
#include "llvm/ADT/VectorExtras.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/SSARegMap.h"
#include "llvm/Constants.h"
#include "llvm/Function.h"
#include "llvm/Intrinsics.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Target/TargetOptions.h"

Include dependency graph for PPCISelLowering.cpp:

Go to the source code of this file.

Functions

static bool isFloatingPointZero (SDOperand Op)
 isFloatingPointZero - Return true if this is 0.0 or -0.0.
static bool isConstantOrUndef (SDOperand Op, unsigned Val)
static bool isVMerge (SDNode *N, unsigned UnitSize, unsigned LHSStart, unsigned RHSStart)
static SDOperand LowerConstantPool (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerJumpTable (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerGlobalAddress (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerSETCC (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerVASTART (SDOperand Op, SelectionDAG &DAG, unsigned VarArgsFrameIndex)
static SDOperand LowerFORMAL_ARGUMENTS (SDOperand Op, SelectionDAG &DAG, int &VarArgsFrameIndex)
static SDNodeisBLACompatibleAddress (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerCALL (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerRET (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerSELECT_CC (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerFP_TO_SINT (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerSINT_TO_FP (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerSHL (SDOperand Op, SelectionDAG &DAG, MVT::ValueType PtrVT)
static SDOperand LowerSRL (SDOperand Op, SelectionDAG &DAG, MVT::ValueType PtrVT)
static SDOperand LowerSRA (SDOperand Op, SelectionDAG &DAG, MVT::ValueType PtrVT)
static bool GetConstantBuildVectorBits (SDNode *BV, uint64_t VectorBits[2], uint64_t UndefBits[2])
static bool isConstantSplat (const uint64_t Bits128[2], const uint64_t Undef128[2], unsigned &SplatBits, unsigned &SplatUndef, unsigned &SplatSize)
static SDOperand BuildSplatI (int Val, unsigned SplatSize, MVT::ValueType VT, SelectionDAG &DAG)
static SDOperand BuildIntrinsicOp (unsigned IID, SDOperand LHS, SDOperand RHS, SelectionDAG &DAG, MVT::ValueType DestVT=MVT::Other)
static SDOperand BuildIntrinsicOp (unsigned IID, SDOperand Op0, SDOperand Op1, SDOperand Op2, SelectionDAG &DAG, MVT::ValueType DestVT=MVT::Other)
static SDOperand BuildVSLDOI (SDOperand LHS, SDOperand RHS, unsigned Amt, MVT::ValueType VT, SelectionDAG &DAG)
static SDOperand LowerBUILD_VECTOR (SDOperand Op, SelectionDAG &DAG)
static SDOperand GeneratePerfectShuffle (unsigned PFEntry, SDOperand LHS, SDOperand RHS, SelectionDAG &DAG)
static SDOperand LowerVECTOR_SHUFFLE (SDOperand Op, SelectionDAG &DAG)
static bool getAltivecCompareInfo (SDOperand Intrin, int &CompareOpc, bool &isDot)
static SDOperand LowerINTRINSIC_WO_CHAIN (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerSCALAR_TO_VECTOR (SDOperand Op, SelectionDAG &DAG)
static SDOperand LowerMUL (SDOperand Op, SelectionDAG &DAG)


Function Documentation

static SDOperand BuildIntrinsicOp ( unsigned  IID,
SDOperand  Op0,
SDOperand  Op1,
SDOperand  Op2,
SelectionDAG DAG,
MVT::ValueType  DestVT = MVT::Other 
) [static]

BuildIntrinsicOp - Return a ternary operator intrinsic node with the specified intrinsic ID.

Definition at line 1625 of file PPCISelLowering.cpp.

References DAG, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SDOperand::getValueType(), llvm::MVT::i32, llvm::ISD::INTRINSIC_WO_CHAIN, and llvm::MVT::Other.

static SDOperand BuildIntrinsicOp ( unsigned  IID,
SDOperand  LHS,
SDOperand  RHS,
SelectionDAG DAG,
MVT::ValueType  DestVT = MVT::Other 
) [static]

BuildIntrinsicOp - Return a binary operator intrinsic node with the specified intrinsic ID.

Definition at line 1615 of file PPCISelLowering.cpp.

References DAG, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SDOperand::getValueType(), llvm::MVT::i32, llvm::ISD::INTRINSIC_WO_CHAIN, and llvm::MVT::Other.

Referenced by LowerBUILD_VECTOR(), and LowerMUL().

static SDOperand BuildSplatI ( int  Val,
unsigned  SplatSize,
MVT::ValueType  VT,
SelectionDAG DAG 
) [static]

BuildSplatI - Build a canonical splati of Val with an element size of SplatSize. Cast the result to VT.

Definition at line 1594 of file PPCISelLowering.cpp.

References llvm::ISD::BIT_CONVERT, llvm::ISD::BUILD_VECTOR, DAG, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::MVT::getVectorBaseType(), llvm::MVT::getVectorNumElements(), Ops, llvm::MVT::Other, llvm::MVT::v16i8, llvm::MVT::v4i32, and llvm::MVT::v8i16.

Referenced by LowerBUILD_VECTOR(), and LowerMUL().

static SDOperand BuildVSLDOI ( SDOperand  LHS,
SDOperand  RHS,
unsigned  Amt,
MVT::ValueType  VT,
SelectionDAG DAG 
) [static]

BuildVSLDOI - Return a VECTOR_SHUFFLE that is a vsldoi of the specified amount. The result has the specified value type.

Definition at line 1636 of file PPCISelLowering.cpp.

References llvm::ISD::BIT_CONVERT, llvm::ISD::BUILD_VECTOR, DAG, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::MVT::i32, Ops, T, llvm::MVT::v16i8, and llvm::ISD::VECTOR_SHUFFLE.

Referenced by GeneratePerfectShuffle(), and LowerBUILD_VECTOR().

static SDOperand GeneratePerfectShuffle ( unsigned  PFEntry,
SDOperand  LHS,
SDOperand  RHS,
SelectionDAG DAG 
) [static]

GeneratePerfectShuffle - Given an entry in the perfect-shuffle table, emit the specified operations to build the shuffle.

Definition at line 1811 of file PPCISelLowering.cpp.

References llvm::ISD::BUILD_VECTOR, BuildVSLDOI(), DAG, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SDOperand::getValueType(), llvm::MVT::i32, Ops, PerfectShuffleTable, llvm::MVT::v16i8, and llvm::ISD::VECTOR_SHUFFLE.

Referenced by LowerVECTOR_SHUFFLE().

static bool getAltivecCompareInfo ( SDOperand  Intrin,
int &  CompareOpc,
bool &  isDot 
) [static]

getAltivecCompareInfo - Given an intrinsic, return false if it is not an altivec comparison. If it is, return true and fill in Opc/isDot with information about the intrinsic.

Definition at line 2011 of file PPCISelLowering.cpp.

References llvm::SDOperand::getOperand(), llvm::Intrinsic::ppc_altivec_vcmpbfp, llvm::Intrinsic::ppc_altivec_vcmpbfp_p, llvm::Intrinsic::ppc_altivec_vcmpeqfp, llvm::Intrinsic::ppc_altivec_vcmpeqfp_p, llvm::Intrinsic::ppc_altivec_vcmpequb, llvm::Intrinsic::ppc_altivec_vcmpequb_p, llvm::Intrinsic::ppc_altivec_vcmpequh, llvm::Intrinsic::ppc_altivec_vcmpequh_p, llvm::Intrinsic::ppc_altivec_vcmpequw, llvm::Intrinsic::ppc_altivec_vcmpequw_p, llvm::Intrinsic::ppc_altivec_vcmpgefp, llvm::Intrinsic::ppc_altivec_vcmpgefp_p, llvm::Intrinsic::ppc_altivec_vcmpgtfp, llvm::Intrinsic::ppc_altivec_vcmpgtfp_p, llvm::Intrinsic::ppc_altivec_vcmpgtsb, llvm::Intrinsic::ppc_altivec_vcmpgtsb_p, llvm::Intrinsic::ppc_altivec_vcmpgtsh, llvm::Intrinsic::ppc_altivec_vcmpgtsh_p, llvm::Intrinsic::ppc_altivec_vcmpgtsw, llvm::Intrinsic::ppc_altivec_vcmpgtsw_p, llvm::Intrinsic::ppc_altivec_vcmpgtub, llvm::Intrinsic::ppc_altivec_vcmpgtub_p, llvm::Intrinsic::ppc_altivec_vcmpgtuh, llvm::Intrinsic::ppc_altivec_vcmpgtuh_p, llvm::Intrinsic::ppc_altivec_vcmpgtuw, and llvm::Intrinsic::ppc_altivec_vcmpgtuw_p.

Referenced by LowerINTRINSIC_WO_CHAIN(), and llvm::PPCTargetLowering::PerformDAGCombine().

static bool GetConstantBuildVectorBits ( SDNode BV,
uint64_t  VectorBits[2],
uint64_t  UndefBits[2] 
) [static]

Definition at line 1503 of file PPCISelLowering.cpp.

References llvm::MVT::f32, llvm::FloatToBits(), llvm::SDNode::getNumOperands(), llvm::SDNode::getOperand(), llvm::MVT::getSizeInBits(), llvm::SDOperand::getValueType(), U, and llvm::ISD::UNDEF.

Referenced by LowerBUILD_VECTOR().

static SDNode* isBLACompatibleAddress ( SDOperand  Op,
SelectionDAG DAG 
) [static]

isCallCompatibleAddress - Return the immediate to use if the specified 32-bit value is representable in the immediate field of a BxA instruction.

Definition at line 923 of file PPCISelLowering.cpp.

References C, DAG, llvm::SelectionDAG::getConstant(), llvm::MVT::i32, Op, and Val.

Referenced by LowerCALL().

static bool isConstantOrUndef ( SDOperand  Op,
unsigned  Val 
) [static]

isConstantOrUndef - Op is either an undef node or a ConstantSDNode. Return true if Op is undef or if it matches the specified value.

Definition at line 325 of file PPCISelLowering.cpp.

References Op, and llvm::ISD::UNDEF.

Referenced by isVMerge(), llvm::PPC::isVPKUHUMShuffleMask(), llvm::PPC::isVPKUWUMShuffleMask(), and llvm::PPC::isVSLDOIShuffleMask().

static bool isConstantSplat ( const uint64_t  Bits128[2],
const uint64_t  Undef128[2],
unsigned &  SplatBits,
unsigned &  SplatUndef,
unsigned &  SplatSize 
) [static]

Definition at line 1543 of file PPCISelLowering.cpp.

Referenced by LowerBUILD_VECTOR().

static bool isFloatingPointZero ( SDOperand  Op  )  [static]

isFloatingPointZero - Return true if this is 0.0 or -0.0.

Definition at line 311 of file PPCISelLowering.cpp.

References CP, llvm::ISD::EXTLOAD, llvm::ISD::LOAD, and Op.

static bool isVMerge ( SDNode N,
unsigned  UnitSize,
unsigned  LHSStart,
unsigned  RHSStart 
) [static]

isVMerge - Common function, used to match vmrg* shuffles.

Definition at line 367 of file PPCISelLowering.cpp.

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

Referenced by llvm::PPC::isVMRGHShuffleMask(), and llvm::PPC::isVMRGLShuffleMask().

static SDOperand LowerBUILD_VECTOR ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 1655 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, llvm::ISD::BIT_CONVERT, llvm::ISD::BUILD_VECTOR, BuildIntrinsicOp(), BuildSplatI(), BuildVSLDOI(), DAG, llvm::SelectionDAG::getConstant(), GetConstantBuildVectorBits(), llvm::SelectionDAG::getNode(), llvm::MVT::i32, isConstantSplat(), Op, llvm::Intrinsic::ppc_altivec_vrlb, llvm::Intrinsic::ppc_altivec_vrlh, llvm::Intrinsic::ppc_altivec_vrlw, llvm::Intrinsic::ppc_altivec_vslb, llvm::Intrinsic::ppc_altivec_vslh, llvm::Intrinsic::ppc_altivec_vslw, llvm::Intrinsic::ppc_altivec_vsrab, llvm::Intrinsic::ppc_altivec_vsrah, llvm::Intrinsic::ppc_altivec_vsraw, llvm::Intrinsic::ppc_altivec_vsrb, llvm::Intrinsic::ppc_altivec_vsrh, llvm::Intrinsic::ppc_altivec_vsrw, llvm::ISD::SUB, T, llvm::MVT::v16i8, llvm::MVT::v4i32, llvm::Use::Val, llvm::ISD::XOR, and Z.

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

static SDOperand LowerCALL ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 936 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, llvm::PPCISD::BCTRL, llvm::PPCISD::CALL, llvm::ISD::CALLSEQ_END, DAG, Dest, llvm::MVT::f32, llvm::MVT::f64, llvm::MVT::Flag, G, llvm::SelectionDAG::getCALLSEQ_START(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getNode(), llvm::TargetLowering::getPointerTy(), llvm::SelectionDAG::getRegister(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::getSrcValue(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SDOperand::getValue(), llvm::Value::getValueType(), llvm::SDOperand::getValueType(), llvm::MVT::i32, llvm::MVT::i64, isBLACompatibleAddress(), llvm::SPII::Load, llvm::ISD::MERGE_VALUES, llvm::PPCISD::MTCTR, NumBytes, Op, Ops, llvm::MVT::Other, llvm::ISD::SIGN_EXTEND, llvm::SPII::Store, llvm::ISD::STORE, llvm::ISD::TokenFactor, llvm::MVT::v16i8, llvm::MVT::v4f32, llvm::MVT::v4i32, llvm::MVT::v8i16, llvm::Use::Val, llvm::SDOperand::Val, and llvm::ISD::ZERO_EXTEND.

static SDOperand LowerConstantPool ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 601 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, C, CP, DAG, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::TargetMachine::getRelocationModel(), llvm::TargetMachine::getSubtarget(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getTargetConstantPool(), llvm::PPCISD::GlobalBaseReg, llvm::PPCISD::Hi, SPISD::Hi, llvm::PPCISD::Lo, SPISD::Lo, Op, llvm::Reloc::PIC_, llvm::Reloc::Static, and TM.

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

static SDOperand LowerFORMAL_ARGUMENTS ( SDOperand  Op,
SelectionDAG DAG,
int &  VarArgsFrameIndex 
) [static]

Definition at line 749 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, llvm::MachineFunction::addLiveIn(), llvm::MachineFrameInfo::CreateFixedObject(), DAG, llvm::MVT::f32, llvm::MVT::f64, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::TargetLowering::getPointerTy(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::getSrcValue(), llvm::MachineFunction::getSSARegMap(), llvm::SelectionDAG::getTargetLoweringInfo(), llvm::SDOperand::getValueType(), llvm::MVT::i32, llvm::MVT::i64, llvm::ISD::MERGE_VALUES, MF, Op, llvm::MVT::Other, RegMap, Root, llvm::ISD::STORE, llvm::SPII::Store, llvm::ISD::TokenFactor, llvm::ISD::UNDEF, llvm::MVT::v16i8, llvm::MVT::v4f32, llvm::MVT::v4i32, llvm::MVT::v8i16, Val, and llvm::Use::Val.

static SDOperand LowerFP_TO_SINT ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 1350 of file PPCISelLowering.cpp.

References llvm::ISD::BIT_CONVERT, Bits, DAG, llvm::MVT::f32, llvm::MVT::f64, llvm::PPCISD::FCTIDZ, llvm::PPCISD::FCTIWZ, llvm::ISD::FP_EXTEND, llvm::SelectionDAG::getNode(), llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::isFloatingPoint(), Op, Src, and llvm::ISD::TRUNCATE.

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

static SDOperand LowerGlobalAddress ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 662 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, DAG, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getEntryNode(), llvm::GlobalAddressSDNode::getGlobal(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getNode(), llvm::GlobalAddressSDNode::getOffset(), llvm::TargetMachine::getRelocationModel(), llvm::SelectionDAG::getSrcValue(), llvm::TargetMachine::getSubtarget(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::PPCISD::GlobalBaseReg, GV, llvm::PPCISD::Hi, SPISD::Hi, llvm::PPCISD::Lo, SPISD::Lo, Op, llvm::Reloc::PIC_, llvm::Reloc::Static, and TM.

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

static SDOperand LowerINTRINSIC_WO_CHAIN ( SDOperand  Op,
SelectionDAG DAG 
) [static]

LowerINTRINSIC_WO_CHAIN - If this is an intrinsic that we want to custom lower, do it, otherwise return null.

Definition at line 2053 of file PPCISelLowering.cpp.

References llvm::ISD::AND, llvm::ISD::BIT_CONVERT, DAG, llvm::MVT::Flag, getAltivecCompareInfo(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getRegister(), llvm::SDOperand::getValue(), llvm::MVT::i32, llvm::PPCISD::MFCR, Op, Ops, llvm::ISD::SRL, llvm::PPCISD::VCMP, llvm::PPCISD::VCMPo, and llvm::ISD::XOR.

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

static SDOperand LowerJumpTable ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 632 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, DAG, llvm::SelectionDAG::getConstant(), llvm::JumpTableSDNode::getIndex(), llvm::SelectionDAG::getNode(), llvm::TargetMachine::getRelocationModel(), llvm::TargetMachine::getSubtarget(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getTargetJumpTable(), llvm::PPCISD::GlobalBaseReg, llvm::PPCISD::Hi, SPISD::Hi, llvm::MVT::i32, llvm::PPCISD::Lo, SPISD::Lo, Op, llvm::Reloc::PIC_, llvm::Reloc::Static, and TM.

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

static SDOperand LowerMUL ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 2131 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, llvm::ISD::BIT_CONVERT, llvm::ISD::BUILD_VECTOR, BuildIntrinsicOp(), BuildSplatI(), DAG, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::MVT::i8, Op, Ops, llvm::Intrinsic::ppc_altivec_vmladduhm, llvm::Intrinsic::ppc_altivec_vmsumuhm, llvm::Intrinsic::ppc_altivec_vmuleub, llvm::Intrinsic::ppc_altivec_vmuloub, llvm::Intrinsic::ppc_altivec_vmulouh, llvm::Intrinsic::ppc_altivec_vrlw, llvm::Intrinsic::ppc_altivec_vslw, llvm::MVT::v16i8, llvm::MVT::v4i32, llvm::MVT::v8i16, and llvm::ISD::VECTOR_SHUFFLE.

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

static SDOperand LowerRET ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 1225 of file PPCISelLowering.cpp.

References llvm::MachineFunction::addLiveOut(), DAG, llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::SDOperand::getValue(), llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::isFloatingPoint(), llvm::MVT::isVector(), llvm::MachineFunction::liveout_empty(), Op, llvm::MVT::Other, and llvm::PPCISD::RET_FLAG.

static SDOperand LowerSCALAR_TO_VECTOR ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 2118 of file PPCISelLowering.cpp.

References llvm::MachineFrameInfo::CreateStackObject(), DAG, llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getSrcValue(), llvm::MVT::i32, Op, llvm::MVT::Other, llvm::ISD::STORE, and llvm::SPII::Store.

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

static SDOperand LowerSELECT_CC ( SDOperand  Op,
SelectionDAG DAG 
) [static]

LowerSELECT_CC - Lower floating point select_cc's into fsel instruction when possible.

Definition at line 1271 of file PPCISelLowering.cpp.

References DAG, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FNEG, llvm::ISD::FP_EXTEND, llvm::PPCISD::FSEL, llvm::ISD::FSUB, llvm::SelectionDAG::getNode(), llvm::SDOperand::getValueType(), llvm::MVT::isFloatingPoint(), isFloatingPointZero(), Op, llvm::ISD::SETEQ, llvm::ISD::SETGE, llvm::ISD::SETGT, llvm::ISD::SETLE, llvm::ISD::SETLT, llvm::ISD::SETNE, llvm::ISD::SETOGE, llvm::ISD::SETOGT, llvm::ISD::SETOLE, llvm::ISD::SETOLT, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, and llvm::ISD::SETULT.

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

static SDOperand LowerSETCC ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 700 of file PPCISelLowering.cpp.

References C, llvm::ISD::CTLZ, DAG, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getSetCC(), llvm::MVT::getSizeInBits(), llvm::MVT::i32, llvm::MVT::isInteger(), llvm::Log2_32(), Op, llvm::ISD::SETEQ, llvm::ISD::SETNE, llvm::ISD::SRL, llvm::ISD::SUB, llvm::ISD::TRUNCATE, and llvm::ISD::ZERO_EXTEND.

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

static SDOperand LowerSHL ( SDOperand  Op,
SelectionDAG DAG,
MVT::ValueType  PtrVT 
) [static]

Definition at line 1410 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, llvm::ISD::BUILD_PAIR, DAG, llvm::ISD::EXTRACT_ELEMENT, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), SPISD::Hi, llvm::MVT::i32, llvm::MVT::i64, SPISD::Lo, Op, llvm::ISD::OR, llvm::PPCISD::SHL, llvm::PPCISD::SRL, llvm::ISD::SUB, and U.

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

static SDOperand LowerSINT_TO_FP ( SDOperand  Op,
SelectionDAG DAG 
) [static]

Definition at line 1374 of file PPCISelLowering.cpp.

References llvm::ISD::BIT_CONVERT, Bits, llvm::MachineFrameInfo::CreateStackObject(), DAG, llvm::PPCISD::EXTSW_32, llvm::MVT::f32, llvm::MVT::f64, llvm::PPCISD::FCFID, llvm::ISD::FP_ROUND, llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getSrcValue(), llvm::MVT::i32, llvm::MVT::i64, Op, llvm::MVT::Other, llvm::PPCISD::STD_32, and llvm::SPII::Store.

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

static SDOperand LowerSRA ( SDOperand  Op,
SelectionDAG DAG,
MVT::ValueType  PtrVT 
) [static]

Definition at line 1466 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, llvm::ISD::BUILD_PAIR, DAG, llvm::ISD::EXTRACT_ELEMENT, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getSelectCC(), SPISD::Hi, llvm::MVT::i32, llvm::MVT::i64, SPISD::Lo, Op, llvm::ISD::OR, llvm::ISD::SETLE, llvm::PPCISD::SHL, llvm::PPCISD::SRA, llvm::PPCISD::SRL, llvm::ISD::SUB, and U.

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

static SDOperand LowerSRL ( SDOperand  Op,
SelectionDAG DAG,
MVT::ValueType  PtrVT 
) [static]

Definition at line 1438 of file PPCISelLowering.cpp.

References llvm::ISD::ADD, llvm::ISD::BUILD_PAIR, DAG, llvm::ISD::EXTRACT_ELEMENT, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), SPISD::Hi, llvm::MVT::i32, llvm::MVT::i64, SPISD::Lo, Op, llvm::ISD::OR, llvm::PPCISD::SHL, llvm::PPCISD::SRL, llvm::ISD::SUB, and U.

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

static SDOperand LowerVASTART ( SDOperand  Op,
SelectionDAG DAG,
unsigned  VarArgsFrameIndex 
) [static]

Definition at line 740 of file PPCISelLowering.cpp.

References DAG, llvm::SelectionDAG::getFrameIndex(), llvm::SelectionDAG::getNode(), llvm::MVT::i32, Op, llvm::MVT::Other, and llvm::ISD::STORE.

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

static SDOperand LowerVECTOR_SHUFFLE ( SDOperand  Op,
SelectionDAG DAG 
) [static]

LowerVECTOR_SHUFFLE - Return the code we lower for VECTOR_SHUFFLE. If this is a shuffle we can handle in a single instruction, return it. Otherwise, return the code it can be lowered into. Worst case, it can always be lowered into a vperm.

Definition at line 1890 of file PPCISelLowering.cpp.

References llvm::ISD::BUILD_VECTOR, DAG, GeneratePerfectShuffle(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SDOperand::getNumOperands(), llvm::SDOperand::getOpcode(), llvm::SDOperand::getOperand(), llvm::MVT::getSizeInBits(), llvm::SDOperand::getValueType(), llvm::MVT::getVectorBaseType(), llvm::MVT::i8, llvm::PPC::isSplatShuffleMask(), llvm::PPC::isVMRGHShuffleMask(), llvm::PPC::isVMRGLShuffleMask(), llvm::PPC::isVPKUHUMShuffleMask(), llvm::PPC::isVPKUWUMShuffleMask(), llvm::PPC::isVSLDOIShuffleMask(), Op, PerfectShuffleTable, llvm::ISD::UNDEF, llvm::MVT::v16i8, llvm::SDOperand::Val, and llvm::PPCISD::VPERM.

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