14 #define DEBUG_TYPE "systemz-selectiondag-info"
59 bool IsVolatile,
bool AlwaysInline,
67 Chain, Dst, Src, CSize->getZExtValue());
75 SDValue Dst, uint64_t ByteVal, uint64_t Size,
78 uint64_t StoreVal = ByteVal;
79 for (
unsigned I = 1;
I < Size; ++
I)
80 StoreVal |= ByteVal << (
I * 8);
83 Dst, DstPtrInfo,
false,
false,
Align);
89 unsigned Align,
bool IsVolatile,
97 uint64_t Bytes = CSize->getZExtValue();
105 uint64_t ByteVal = CByte->getZExtValue();
106 if (ByteVal == 0 || ByteVal == 255 ?
109 unsigned Size1 = Bytes == 16 ? 8 : 1 <<
findLastSet(Bytes);
110 unsigned Size2 = Bytes - Size1;
119 std::min(Align, Size1), DstPtrInfo);
126 false,
false, Align);
137 assert(Bytes >= 2 &&
"Should have dealt with 0- and 1-byte cases already");
143 Chain, Dst, Dst, Bytes);
147 Chain = DAG.
getStore(Chain, DL, Byte, Dst, DstPtrInfo,
148 false,
false, Align);
152 Chain, DstPlus1, Dst, Bytes - 1);
198 uint64_t Bytes = CSize->getZExtValue();
199 assert(Bytes > 0 &&
"Caller should have handled 0-size case");
200 Chain =
emitCLC(DAG, DL, Chain, Src1, Src2, Bytes);
234 return std::make_pair(End, Chain);
245 return std::make_pair(isStpcpy ? EndDest : Dest, EndDest.
getValue(1));
275 return std::make_pair(Len, Chain);
static MVT getIntegerVT(unsigned BitWidth)
void push_back(const T &Elt)
SDValue getConstant(uint64_t Val, EVT VT, bool isTarget=false)
SDValue getValue(unsigned R) const
static SDValue emitCLC(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src1, SDValue Src2, uint64_t Size)
~SystemZSelectionDAGInfo()
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
static SDValue memsetStore(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Dst, uint64_t ByteVal, uint64_t Size, unsigned Align, MachinePointerInfo DstPtrInfo)
virtual std::pair< SDValue, SDValue > EmitTargetCodeForStrnlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, SDValue MaxLength, MachinePointerInfo SrcPtrInfo) const LLVM_OVERRIDE
virtual std::pair< SDValue, SDValue > EmitTargetCodeForStrcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Dest, SDValue Src, MachinePointerInfo DestPtrInfo, MachinePointerInfo SrcPtrInfo, bool isStpcpy) const LLVM_OVERRIDE
SDValue getStore(SDValue Chain, SDLoc dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, bool isVolatile, bool isNonTemporal, unsigned Alignment, const MDNode *TBAAInfo=0)
virtual SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool IsVolatile, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const LLVM_OVERRIDE
virtual std::pair< SDValue, SDValue > EmitTargetCodeForStrcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src1, SDValue Src2, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const LLVM_OVERRIDE
MachinePointerInfo getWithOffset(int64_t O) const
static SDValue addIPMSequence(SDLoc DL, SDValue Glue, SelectionDAG &DAG)
SDVTList getVTList(EVT VT)
Simple integer binary arithmetic operators.
Sequence
A sequence of states that a pointer may go through in which an objc_retain and objc_release are actua...
static std::pair< SDValue, SDValue > getBoundedStrlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, SDValue Limit)
virtual SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Dst, SDValue Byte, SDValue Size, unsigned Align, bool IsVolatile, MachinePointerInfo DstPtrInfo) const LLVM_OVERRIDE
unsigned CountPopulation_64(uint64_t Value)
const unsigned CCMASK_SRST_FOUND
virtual std::pair< SDValue, SDValue > EmitTargetCodeForMemchr(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, SDValue Char, SDValue Length, MachinePointerInfo SrcPtrInfo) const LLVM_OVERRIDE
virtual std::pair< SDValue, SDValue > EmitTargetCodeForStrlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, MachinePointerInfo SrcPtrInfo) const LLVM_OVERRIDE
SystemZSelectionDAGInfo(const SystemZTargetMachine &TM)
const unsigned CCMASK_SRST
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT)
static cl::opt< AlignMode > Align(cl::desc("Load/store alignment support"), cl::Hidden, cl::init(DefaultAlign), cl::values(clEnumValN(DefaultAlign,"arm-default-align","Generate unaligned accesses only on hardware/OS ""combinations that are known to support them"), clEnumValN(StrictAlign,"arm-strict-align","Disallow all unaligned memory accesses"), clEnumValN(NoStrictAlign,"arm-no-strict-align","Allow unaligned memory accesses"), clEnumValEnd))
Bitwise operators - logical and, logical or, logical xor.
static SDValue emitMemMem(SelectionDAG &DAG, SDLoc DL, unsigned Sequence, unsigned Loop, SDValue Chain, SDValue Dst, SDValue Src, uint64_t Size)
virtual std::pair< SDValue, SDValue > EmitTargetCodeForMemcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src1, SDValue Src2, SDValue Size, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const LLVM_OVERRIDE
SDValue getZExtOrTrunc(SDValue Op, SDLoc DL, EVT VT)
uint64_t getZExtValue() const
enable_if_c< std::numeric_limits< T >::is_integer &&!std::numeric_limits< T >::is_signed, T >::type findLastSet(T Val, ZeroBehavior ZB=ZB_Max)
Get the index of the last set bit starting from the least significant bit.