#include "SystemZISelLowering.h"
#include "SystemZCallingConv.h"
#include "SystemZConstantPoolValue.h"
#include "SystemZMachineFunctionInfo.h"
#include "SystemZTargetMachine.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsS390.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/KnownBits.h"
#include <cctype>
#include <optional>
usingnamespacellvm;
#define DEBUG_TYPE …
namespace {
struct Comparison { … };
}
static bool is32Bit(EVT VT) { … }
static MachineOperand earlyUseOperand(MachineOperand Op) { … }
SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM,
const SystemZSubtarget &STI)
: … { … }
bool SystemZTargetLowering::useSoftFloat() const { … }
EVT SystemZTargetLowering::getSetCCResultType(const DataLayout &DL,
LLVMContext &, EVT VT) const { … }
bool SystemZTargetLowering::isFMAFasterThanFMulAndFAdd(
const MachineFunction &MF, EVT VT) const { … }
bool SystemZVectorConstantInfo::isVectorConstantLegal(
const SystemZSubtarget &Subtarget) { … }
SystemZVectorConstantInfo::SystemZVectorConstantInfo(APInt IntImm) { … }
SystemZVectorConstantInfo::SystemZVectorConstantInfo(BuildVectorSDNode *BVN) { … }
bool SystemZTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT,
bool ForCodeSize) const { … }
bool SystemZTargetLowering::hasInlineStackProbe(const MachineFunction &MF) const { … }
TargetLowering::AtomicExpansionKind
SystemZTargetLowering::shouldCastAtomicLoadInIR(LoadInst *LI) const { … }
TargetLowering::AtomicExpansionKind
SystemZTargetLowering::shouldCastAtomicStoreInIR(StoreInst *SI) const { … }
TargetLowering::AtomicExpansionKind
SystemZTargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *RMW) const { … }
bool SystemZTargetLowering::isLegalICmpImmediate(int64_t Imm) const { … }
bool SystemZTargetLowering::isLegalAddImmediate(int64_t Imm) const { … }
bool SystemZTargetLowering::allowsMisalignedMemoryAccesses(
EVT VT, unsigned, Align, MachineMemOperand::Flags, unsigned *Fast) const { … }
struct AddressingMode { … };
static AddressingMode getLoadStoreAddrMode(bool HasVector,
Type *Ty) { … }
static AddressingMode
supportedAddressingMode(Instruction *I, bool HasVector) { … }
bool SystemZTargetLowering::isLegalAddressingMode(const DataLayout &DL,
const AddrMode &AM, Type *Ty, unsigned AS, Instruction *I) const { … }
bool SystemZTargetLowering::findOptimalMemOpLowering(
std::vector<EVT> &MemOps, unsigned Limit, const MemOp &Op, unsigned DstAS,
unsigned SrcAS, const AttributeList &FuncAttributes) const { … }
EVT SystemZTargetLowering::getOptimalMemOpType(const MemOp &Op,
const AttributeList &FuncAttributes) const { … }
bool SystemZTargetLowering::isTruncateFree(Type *FromType, Type *ToType) const { … }
bool SystemZTargetLowering::isTruncateFree(EVT FromVT, EVT ToVT) const { … }
TargetLowering::ConstraintType
SystemZTargetLowering::getConstraintType(StringRef Constraint) const { … }
TargetLowering::ConstraintWeight SystemZTargetLowering::
getSingleConstraintMatchWeight(AsmOperandInfo &info,
const char *constraint) const { … }
static std::pair<unsigned, const TargetRegisterClass *>
parseRegisterNumber(StringRef Constraint, const TargetRegisterClass *RC,
const unsigned *Map, unsigned Size) { … }
std::pair<unsigned, const TargetRegisterClass *>
SystemZTargetLowering::getRegForInlineAsmConstraint(
const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const { … }
Register
SystemZTargetLowering::getRegisterByName(const char *RegName, LLT VT,
const MachineFunction &MF) const { … }
Register SystemZTargetLowering::getExceptionPointerRegister(
const Constant *PersonalityFn) const { … }
Register SystemZTargetLowering::getExceptionSelectorRegister(
const Constant *PersonalityFn) const { … }
void SystemZTargetLowering::LowerAsmOperandForConstraint(
SDValue Op, StringRef Constraint, std::vector<SDValue> &Ops,
SelectionDAG &DAG) const { … }
#include "SystemZGenCallingConv.inc"
const MCPhysReg *SystemZTargetLowering::getScratchRegisters(
CallingConv::ID) const { … }
bool SystemZTargetLowering::allowTruncateForTailCall(Type *FromType,
Type *ToType) const { … }
bool SystemZTargetLowering::mayBeEmittedAsTailCall(const CallInst *CI) const { … }
static SDValue convertLocVTToValVT(SelectionDAG &DAG, const SDLoc &DL,
CCValAssign &VA, SDValue Chain,
SDValue Value) { … }
static SDValue convertValVTToLocVT(SelectionDAG &DAG, const SDLoc &DL,
CCValAssign &VA, SDValue Value) { … }
static SDValue lowerI128ToGR128(SelectionDAG &DAG, SDValue In) { … }
static SDValue lowerGR128ToI128(SelectionDAG &DAG, SDValue In) { … }
bool SystemZTargetLowering::splitValueIntoRegisterParts(
SelectionDAG &DAG, const SDLoc &DL, SDValue Val, SDValue *Parts,
unsigned NumParts, MVT PartVT, std::optional<CallingConv::ID> CC) const { … }
SDValue SystemZTargetLowering::joinRegisterPartsIntoValue(
SelectionDAG &DAG, const SDLoc &DL, const SDValue *Parts, unsigned NumParts,
MVT PartVT, EVT ValueVT, std::optional<CallingConv::ID> CC) const { … }
SDValue SystemZTargetLowering::LowerFormalArguments(
SDValue Chain, CallingConv::ID CallConv, bool IsVarArg,
const SmallVectorImpl<ISD::InputArg> &Ins, const SDLoc &DL,
SelectionDAG &DAG, SmallVectorImpl<SDValue> &InVals) const { … }
static bool canUseSiblingCall(const CCState &ArgCCInfo,
SmallVectorImpl<CCValAssign> &ArgLocs,
SmallVectorImpl<ISD::OutputArg> &Outs) { … }
static SDValue getADAEntry(SelectionDAG &DAG, SDValue Val, SDLoc DL,
unsigned Offset, bool LoadAdr = false) { … }
static SDValue getADAEntry(SelectionDAG &DAG, const GlobalValue *GV, SDLoc DL,
EVT PtrVT) { … }
static bool getzOSCalleeAndADA(SelectionDAG &DAG, SDValue &Callee, SDValue &ADA,
SDLoc &DL, SDValue &Chain) { … }
SDValue
SystemZTargetLowering::LowerCall(CallLoweringInfo &CLI,
SmallVectorImpl<SDValue> &InVals) const { … }
std::pair<SDValue, SDValue> SystemZTargetLowering::makeExternalCall(
SDValue Chain, SelectionDAG &DAG, const char *CalleeName, EVT RetVT,
ArrayRef<SDValue> Ops, CallingConv::ID CallConv, bool IsSigned, SDLoc DL,
bool DoesNotReturn, bool IsReturnValueUsed) const { … }
bool SystemZTargetLowering::
CanLowerReturn(CallingConv::ID CallConv,
MachineFunction &MF, bool isVarArg,
const SmallVectorImpl<ISD::OutputArg> &Outs,
LLVMContext &Context) const { … }
SDValue
SystemZTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv,
bool IsVarArg,
const SmallVectorImpl<ISD::OutputArg> &Outs,
const SmallVectorImpl<SDValue> &OutVals,
const SDLoc &DL, SelectionDAG &DAG) const { … }
static bool isIntrinsicWithCCAndChain(SDValue Op, unsigned &Opcode,
unsigned &CCValid) { … }
static bool isIntrinsicWithCC(SDValue Op, unsigned &Opcode, unsigned &CCValid) { … }
static SDNode *emitIntrinsicWithCCAndChain(SelectionDAG &DAG, SDValue Op,
unsigned Opcode) { … }
static SDNode *emitIntrinsicWithCC(SelectionDAG &DAG, SDValue Op,
unsigned Opcode) { … }
static unsigned CCMaskForCondCode(ISD::CondCode CC) { … }
static void adjustZeroCmp(SelectionDAG &DAG, const SDLoc &DL, Comparison &C) { … }
static void adjustSubwordCmp(SelectionDAG &DAG, const SDLoc &DL,
Comparison &C) { … }
static bool isNaturalMemoryOperand(SDValue Op, unsigned ICmpType) { … }
static bool shouldSwapCmpOperands(const Comparison &C) { … }
static void adjustForSubtraction(SelectionDAG &DAG, const SDLoc &DL,
Comparison &C) { … }
static void adjustForFNeg(Comparison &C) { … }
static void adjustForLTGFR(Comparison &C) { … }
static void adjustICmpTruncate(SelectionDAG &DAG, const SDLoc &DL,
Comparison &C) { … }
static bool isSimpleShift(SDValue N, unsigned &ShiftVal) { … }
static unsigned getTestUnderMaskCond(unsigned BitSize, unsigned CCMask,
uint64_t Mask, uint64_t CmpVal,
unsigned ICmpType) { … }
static void adjustForTestUnderMask(SelectionDAG &DAG, const SDLoc &DL,
Comparison &C) { … }
static void adjustICmp128(SelectionDAG &DAG, const SDLoc &DL,
Comparison &C) { … }
static void adjustForRedundantAnd(SelectionDAG &DAG, const SDLoc &DL,
Comparison &C) { … }
static Comparison getIntrinsicCmp(SelectionDAG &DAG, unsigned Opcode,
SDValue Call, unsigned CCValid, uint64_t CC,
ISD::CondCode Cond) { … }
static Comparison getCmp(SelectionDAG &DAG, SDValue CmpOp0, SDValue CmpOp1,
ISD::CondCode Cond, const SDLoc &DL,
SDValue Chain = SDValue(),
bool IsSignaling = false) { … }
static SDValue emitCmp(SelectionDAG &DAG, const SDLoc &DL, Comparison &C) { … }
static void lowerMUL_LOHI32(SelectionDAG &DAG, const SDLoc &DL, unsigned Extend,
SDValue Op0, SDValue Op1, SDValue &Hi,
SDValue &Lo) { … }
static void lowerGR128Binary(SelectionDAG &DAG, const SDLoc &DL, EVT VT,
unsigned Opcode, SDValue Op0, SDValue Op1,
SDValue &Even, SDValue &Odd) { … }
static SDValue emitSETCC(SelectionDAG &DAG, const SDLoc &DL, SDValue CCReg,
unsigned CCValid, unsigned CCMask) { … }
enum class CmpMode { … };
static unsigned getVectorComparison(ISD::CondCode CC, CmpMode Mode) { … }
static unsigned getVectorComparisonOrInvert(ISD::CondCode CC, CmpMode Mode,
bool &Invert) { … }
static SDValue expandV4F32ToV2F64(SelectionDAG &DAG, int Start, const SDLoc &DL,
SDValue Op, SDValue Chain) { … }
SDValue SystemZTargetLowering::getVectorCmp(SelectionDAG &DAG, unsigned Opcode,
const SDLoc &DL, EVT VT,
SDValue CmpOp0,
SDValue CmpOp1,
SDValue Chain) const { … }
SDValue SystemZTargetLowering::lowerVectorSETCC(SelectionDAG &DAG,
const SDLoc &DL, EVT VT,
ISD::CondCode CC,
SDValue CmpOp0,
SDValue CmpOp1,
SDValue Chain,
bool IsSignaling) const { … }
SDValue SystemZTargetLowering::lowerSETCC(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerSTRICT_FSETCC(SDValue Op,
SelectionDAG &DAG,
bool IsSignaling) const { … }
SDValue SystemZTargetLowering::lowerBR_CC(SDValue Op, SelectionDAG &DAG) const { … }
static bool isAbsolute(SDValue CmpOp, SDValue Pos, SDValue Neg) { … }
static SDValue getAbsolute(SelectionDAG &DAG, const SDLoc &DL, SDValue Op,
bool IsNegative) { … }
SDValue SystemZTargetLowering::lowerSELECT_CC(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerGlobalAddress(GlobalAddressSDNode *Node,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerTLSGetOffset(GlobalAddressSDNode *Node,
SelectionDAG &DAG,
unsigned Opcode,
SDValue GOTOffset) const { … }
SDValue SystemZTargetLowering::lowerThreadPointer(const SDLoc &DL,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerGlobalTLSAddress(GlobalAddressSDNode *Node,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerBlockAddress(BlockAddressSDNode *Node,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerJumpTable(JumpTableSDNode *JT,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerConstantPool(ConstantPoolSDNode *CP,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerFRAMEADDR(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerRETURNADDR(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerBITCAST(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerVASTART(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerVASTART_XPLINK(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerVASTART_ELF(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerVACOPY(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue
SystemZTargetLowering::lowerDYNAMIC_STACKALLOC(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue
SystemZTargetLowering::lowerDYNAMIC_STACKALLOC_XPLINK(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue
SystemZTargetLowering::lowerDYNAMIC_STACKALLOC_ELF(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerGET_DYNAMIC_AREA_OFFSET(
SDValue Op, SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerSMUL_LOHI(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerUMUL_LOHI(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerSDIVREM(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerUDIVREM(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerOR(SDValue Op, SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerXALUO(SDValue Op,
SelectionDAG &DAG) const { … }
static bool isAddCarryChain(SDValue Carry) { … }
static bool isSubBorrowChain(SDValue Carry) { … }
SDValue SystemZTargetLowering::lowerUADDSUBO_CARRY(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerCTPOP(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerATOMIC_FENCE(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerATOMIC_LDST_I128(SDValue Op,
SelectionDAG &DAG) const { … }
static void getCSAddressAndShifts(SDValue Addr, SelectionDAG &DAG, SDLoc DL,
SDValue &AlignedAddr, SDValue &BitShift,
SDValue &NegBitShift) { … }
SDValue SystemZTargetLowering::lowerATOMIC_LOAD_OP(SDValue Op,
SelectionDAG &DAG,
unsigned Opcode) const { … }
SDValue SystemZTargetLowering::lowerATOMIC_LOAD_SUB(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerATOMIC_CMP_SWAP(SDValue Op,
SelectionDAG &DAG) const { … }
MachineMemOperand::Flags
SystemZTargetLowering::getTargetMMOFlags(const Instruction &I) const { … }
SDValue SystemZTargetLowering::lowerSTACKSAVE(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerSTACKRESTORE(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerPREFETCH(SDValue Op,
SelectionDAG &DAG) const { … }
static SDValue getCCResult(SelectionDAG &DAG, SDValue CCReg) { … }
SDValue
SystemZTargetLowering::lowerINTRINSIC_W_CHAIN(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue
SystemZTargetLowering::lowerINTRINSIC_WO_CHAIN(SDValue Op,
SelectionDAG &DAG) const { … }
namespace {
struct Permute { … };
}
static const Permute PermuteForms[] = …;
static bool chooseShuffleOpNos(int *OpNos, unsigned &OpNo0, unsigned &OpNo1) { … }
static bool matchPermute(const SmallVectorImpl<int> &Bytes, const Permute &P,
unsigned &OpNo0, unsigned &OpNo1) { … }
static const Permute *matchPermute(const SmallVectorImpl<int> &Bytes,
unsigned &OpNo0, unsigned &OpNo1) { … }
static bool matchDoublePermute(const SmallVectorImpl<int> &Bytes,
const Permute &P,
SmallVectorImpl<int> &Transform) { … }
static const Permute *matchDoublePermute(const SmallVectorImpl<int> &Bytes,
SmallVectorImpl<int> &Transform) { … }
static bool getVPermMask(SDValue ShuffleOp,
SmallVectorImpl<int> &Bytes) { … }
static bool getShuffleInput(const SmallVectorImpl<int> &Bytes, unsigned Start,
unsigned BytesPerElement, int &Base) { … }
static bool isShlDoublePermute(const SmallVectorImpl<int> &Bytes,
unsigned &StartIndex, unsigned &OpNo0,
unsigned &OpNo1) { … }
static SDValue getPermuteNode(SelectionDAG &DAG, const SDLoc &DL,
const Permute &P, SDValue Op0, SDValue Op1) { … }
static bool isZeroVector(SDValue N) { … }
static uint32_t findZeroVectorIdx(SDValue *Ops, unsigned Num) { … }
static SDValue getGeneralPermuteNode(SelectionDAG &DAG, const SDLoc &DL,
SDValue *Ops,
const SmallVectorImpl<int> &Bytes) { … }
namespace {
struct GeneralShuffle { … };
}
void GeneralShuffle::addUndef() { … }
bool GeneralShuffle::add(SDValue Op, unsigned Elem) { … }
SDValue GeneralShuffle::getNode(SelectionDAG &DAG, const SDLoc &DL) { … }
#ifndef NDEBUG
static void dumpBytes(const SmallVectorImpl<int> &Bytes, std::string Msg) {
dbgs() << Msg.c_str() << " { ";
for (unsigned i = 0; i < Bytes.size(); i++)
dbgs() << Bytes[i] << " ";
dbgs() << "}\n";
}
#endif
void GeneralShuffle::tryPrepareForUnpack() { … }
SDValue GeneralShuffle::insertUnpackIfPrepared(SelectionDAG &DAG,
const SDLoc &DL,
SDValue Op) { … }
static bool isScalarToVector(SDValue Op) { … }
static SDValue buildScalarToVector(SelectionDAG &DAG, const SDLoc &DL, EVT VT,
SDValue Value) { … }
static SDValue buildMergeScalars(SelectionDAG &DAG, const SDLoc &DL, EVT VT,
SDValue Op0, SDValue Op1) { … }
static SDValue joinDwords(SelectionDAG &DAG, const SDLoc &DL, SDValue Op0,
SDValue Op1) { … }
static SDValue tryBuildVectorShuffle(SelectionDAG &DAG,
BuildVectorSDNode *BVN) { … }
bool SystemZTargetLowering::isVectorElementLoad(SDValue Op) const { … }
SDValue
SystemZTargetLowering::buildVector(SelectionDAG &DAG, const SDLoc &DL, EVT VT,
SmallVectorImpl<SDValue> &Elems) const { … }
SDValue SystemZTargetLowering::lowerBUILD_VECTOR(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerVECTOR_SHUFFLE(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerSCALAR_TO_VECTOR(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerINSERT_VECTOR_ELT(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue
SystemZTargetLowering::lowerEXTRACT_VECTOR_ELT(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::
lowerSIGN_EXTEND_VECTOR_INREG(SDValue Op, SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::
lowerZERO_EXTEND_VECTOR_INREG(SDValue Op, SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerShift(SDValue Op, SelectionDAG &DAG,
unsigned ByScalar) const { … }
static SDValue lowerAddrSpaceCast(SDValue Op, SelectionDAG &DAG) { … }
SDValue SystemZTargetLowering::lowerIS_FPCLASS(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerREADCYCLECOUNTER(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::LowerOperation(SDValue Op,
SelectionDAG &DAG) const { … }
static SDValue expandBitCastI128ToF128(SelectionDAG &DAG, SDValue Src,
const SDLoc &SL) { … }
static SDValue expandBitCastF128ToI128(SelectionDAG &DAG, SDValue Src,
const SDLoc &SL) { … }
void
SystemZTargetLowering::LowerOperationWrapper(SDNode *N,
SmallVectorImpl<SDValue> &Results,
SelectionDAG &DAG) const { … }
void
SystemZTargetLowering::ReplaceNodeResults(SDNode *N,
SmallVectorImpl<SDValue> &Results,
SelectionDAG &DAG) const { … }
const char *SystemZTargetLowering::getTargetNodeName(unsigned Opcode) const { … }
bool SystemZTargetLowering::canTreatAsByteVector(EVT VT) const { … }
SDValue SystemZTargetLowering::combineExtract(const SDLoc &DL, EVT ResVT,
EVT VecVT, SDValue Op,
unsigned Index,
DAGCombinerInfo &DCI,
bool Force) const { … }
SDValue SystemZTargetLowering::combineTruncateExtract(
const SDLoc &DL, EVT TruncVT, SDValue Op, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineZERO_EXTEND(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineSIGN_EXTEND_INREG(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineSIGN_EXTEND(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineMERGE(
SDNode *N, DAGCombinerInfo &DCI) const { … }
static bool isI128MovedToParts(LoadSDNode *LD, SDNode *&LoPart,
SDNode *&HiPart) { … }
static bool isF128MovedToParts(LoadSDNode *LD, SDNode *&LoPart,
SDNode *&HiPart) { … }
SDValue SystemZTargetLowering::combineLOAD(
SDNode *N, DAGCombinerInfo &DCI) const { … }
bool SystemZTargetLowering::canLoadStoreByteSwapped(EVT VT) const { … }
static bool isVectorElementSwap(ArrayRef<int> M, EVT VT) { … }
static bool isOnlyUsedByStores(SDValue StoredVal, SelectionDAG &DAG) { … }
static bool isI128MovedFromParts(SDValue Val, SDValue &LoPart,
SDValue &HiPart) { … }
static bool isF128MovedFromParts(SDValue Val, SDValue &LoPart,
SDValue &HiPart) { … }
SDValue SystemZTargetLowering::combineSTORE(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineVECTOR_SHUFFLE(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineEXTRACT_VECTOR_ELT(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineJOIN_DWORDS(
SDNode *N, DAGCombinerInfo &DCI) const { … }
static SDValue MergeInputChains(SDNode *N1, SDNode *N2) { … }
SDValue SystemZTargetLowering::combineFP_ROUND(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineFP_EXTEND(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineINT_TO_FP(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineBSWAP(
SDNode *N, DAGCombinerInfo &DCI) const { … }
static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { … }
SDValue SystemZTargetLowering::combineBR_CCMASK(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineSELECT_CCMASK(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineGET_CCMASK(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineIntDIVREM(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::combineINTRINSIC(
SDNode *N, DAGCombinerInfo &DCI) const { … }
SDValue SystemZTargetLowering::unwrapAddress(SDValue N) const { … }
SDValue SystemZTargetLowering::PerformDAGCombine(SDNode *N,
DAGCombinerInfo &DCI) const { … }
static APInt getDemandedSrcElements(SDValue Op, const APInt &DemandedElts,
unsigned OpNo) { … }
static void computeKnownBitsBinOp(const SDValue Op, KnownBits &Known,
const APInt &DemandedElts,
const SelectionDAG &DAG, unsigned Depth,
unsigned OpNo) { … }
void
SystemZTargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
KnownBits &Known,
const APInt &DemandedElts,
const SelectionDAG &DAG,
unsigned Depth) const { … }
static unsigned computeNumSignBitsBinOp(SDValue Op, const APInt &DemandedElts,
const SelectionDAG &DAG, unsigned Depth,
unsigned OpNo) { … }
unsigned
SystemZTargetLowering::ComputeNumSignBitsForTargetNode(
SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG,
unsigned Depth) const { … }
bool SystemZTargetLowering::
isGuaranteedNotToBeUndefOrPoisonForTargetNode(SDValue Op,
const APInt &DemandedElts, const SelectionDAG &DAG,
bool PoisonOnly, unsigned Depth) const { … }
unsigned
SystemZTargetLowering::getStackProbeSize(const MachineFunction &MF) const { … }
static Register forceReg(MachineInstr &MI, MachineOperand &Base,
const SystemZInstrInfo *TII) { … }
static bool checkCCKill(MachineInstr &MI, MachineBasicBlock *MBB) { … }
static bool isSelectPseudo(MachineInstr &MI) { … }
static void createPHIsForSelects(SmallVector<MachineInstr*, 8> &Selects,
MachineBasicBlock *TrueMBB,
MachineBasicBlock *FalseMBB,
MachineBasicBlock *SinkMBB) { … }
MachineBasicBlock *
SystemZTargetLowering::emitAdjCallStack(MachineInstr &MI,
MachineBasicBlock *BB) const { … }
MachineBasicBlock *
SystemZTargetLowering::emitSelect(MachineInstr &MI,
MachineBasicBlock *MBB) const { … }
MachineBasicBlock *SystemZTargetLowering::emitCondStore(MachineInstr &MI,
MachineBasicBlock *MBB,
unsigned StoreOpcode,
unsigned STOCOpcode,
bool Invert) const { … }
MachineBasicBlock *
SystemZTargetLowering::emitICmp128Hi(MachineInstr &MI,
MachineBasicBlock *MBB,
bool Unsigned) const { … }
MachineBasicBlock *SystemZTargetLowering::emitAtomicLoadBinary(
MachineInstr &MI, MachineBasicBlock *MBB, unsigned BinOpcode,
bool Invert) const { … }
MachineBasicBlock *SystemZTargetLowering::emitAtomicLoadMinMax(
MachineInstr &MI, MachineBasicBlock *MBB, unsigned CompareOpcode,
unsigned KeepOldMask) const { … }
MachineBasicBlock *
SystemZTargetLowering::emitAtomicCmpSwapW(MachineInstr &MI,
MachineBasicBlock *MBB) const { … }
MachineBasicBlock *
SystemZTargetLowering::emitPair128(MachineInstr &MI,
MachineBasicBlock *MBB) const { … }
MachineBasicBlock *SystemZTargetLowering::emitExt128(MachineInstr &MI,
MachineBasicBlock *MBB,
bool ClearEven) const { … }
MachineBasicBlock *
SystemZTargetLowering::emitMemMemWrapper(MachineInstr &MI,
MachineBasicBlock *MBB,
unsigned Opcode, bool IsMemset) const { … }
MachineBasicBlock *SystemZTargetLowering::emitStringWrapper(
MachineInstr &MI, MachineBasicBlock *MBB, unsigned Opcode) const { … }
MachineBasicBlock *SystemZTargetLowering::emitTransactionBegin(
MachineInstr &MI, MachineBasicBlock *MBB, unsigned Opcode,
bool NoFloat) const { … }
MachineBasicBlock *SystemZTargetLowering::emitLoadAndTestCmp0(
MachineInstr &MI, MachineBasicBlock *MBB, unsigned Opcode) const { … }
MachineBasicBlock *SystemZTargetLowering::emitProbedAlloca(
MachineInstr &MI, MachineBasicBlock *MBB) const { … }
SDValue SystemZTargetLowering::
getBackchainAddress(SDValue SP, SelectionDAG &DAG) const { … }
MachineBasicBlock *SystemZTargetLowering::EmitInstrWithCustomInserter(
MachineInstr &MI, MachineBasicBlock *MBB) const { … }
const TargetRegisterClass *
SystemZTargetLowering::getRepRegClassFor(MVT VT) const { … }
SDValue SystemZTargetLowering::lowerGET_ROUNDING(SDValue Op,
SelectionDAG &DAG) const { … }
SDValue SystemZTargetLowering::lowerVECREDUCE_ADD(SDValue Op,
SelectionDAG &DAG) const { … }