19 #define DEBUG_TYPE "systemz-selectiondag-info"
52 bool IsVolatile,
bool AlwaysInline,
58 if (
auto *CSize = dyn_cast<ConstantSDNode>(Size))
60 Chain, Dst, Src, CSize->getZExtValue());
68 SDValue Dst, uint64_t ByteVal, uint64_t Size,
71 uint64_t StoreVal = ByteVal;
72 for (
unsigned I = 1;
I < Size; ++
I)
73 StoreVal |= ByteVal << (
I * 8);
77 Dst, DstPtrInfo,
false,
false,
Align);
83 unsigned Align,
bool IsVolatile,
90 if (
auto *CSize = dyn_cast<ConstantSDNode>(Size)) {
91 uint64_t Bytes = CSize->getZExtValue();
94 if (
auto *CByte = dyn_cast<ConstantSDNode>(Byte)) {
99 uint64_t ByteVal = CByte->getZExtValue();
100 if (ByteVal == 0 || ByteVal == 255 ?
103 unsigned Size1 = Bytes == 16 ? 8 : 1 <<
findLastSet(Bytes);
104 unsigned Size2 = Bytes - Size1;
113 std::min(Align, Size1), DstPtrInfo);
120 false,
false, Align);
131 assert(Bytes >= 2 &&
"Should have dealt with 0- and 1-byte cases already");
135 if (CByte && CByte->getZExtValue() == 0)
137 Chain, Dst, Dst, Bytes);
141 Chain = DAG.
getStore(Chain, DL, Byte, Dst, DstPtrInfo,
142 false,
false, Align);
146 Chain, DstPlus1, Dst, Bytes - 1);
191 if (
auto *CSize = dyn_cast<ConstantSDNode>(Size)) {
192 uint64_t Bytes = CSize->getZExtValue();
193 assert(Bytes > 0 &&
"Caller should have handled 0-size case");
194 Chain =
emitCLC(DAG, DL, Chain, Src1, Src2, Bytes);
226 return std::make_pair(End, Chain);
237 return std::make_pair(isStpcpy ? EndDest : Dest, EndDest.
getValue(1));
267 return std::make_pair(Len, Chain);
static MVT getIntegerVT(unsigned BitWidth)
SDValue getValue(unsigned R) const
T findLastSet(T Val, ZeroBehavior ZB=ZB_Max)
Get the index of the last set bit starting from the least significant bit.
static SDValue emitCLC(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src1, SDValue Src2, uint64_t Size)
static SDValue memsetStore(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Dst, uint64_t ByteVal, uint64_t Size, unsigned Align, MachinePointerInfo DstPtrInfo)
SDValue getStore(SDValue Chain, SDLoc dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, bool isVolatile, bool isNonTemporal, unsigned Alignment, const AAMDNodes &AAInfo=AAMDNodes())
Helper function to build ISD::STORE nodes.
MachinePointerInfo getWithOffset(int64_t O) const
static SDValue addIPMSequence(SDLoc DL, SDValue Glue, SelectionDAG &DAG)
Number of individual test Apply this number of consecutive mutations to each input exit after the first new interesting input is found the minimized corpus is saved into the first input directory Number of jobs to run If min(jobs, NumberOfCpuCores()/2)\" is used.") FUZZER_FLAG_INT(reload
SDVTList getVTList(EVT VT)
Return an SDVTList that represents the list of values specified.
This represents a list of ValueType's that has been intern'd by a SelectionDAG.
Simple integer binary arithmetic operators.
std::pair< SDValue, SDValue > EmitTargetCodeForStrlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, MachinePointerInfo SrcPtrInfo) const override
static std::pair< SDValue, SDValue > getBoundedStrlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, SDValue Limit)
std::pair< SDValue, SDValue > EmitTargetCodeForMemcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src1, SDValue Src2, SDValue Size, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const override
EmitTargetCodeForMemcmp - Emit target-specific code that performs a memcmp, in cases where that is fa...
SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Dst, SDValue Byte, SDValue Size, unsigned Align, bool IsVolatile, MachinePointerInfo DstPtrInfo) const override
EmitTargetCodeForMemset - Emit target-specific code that performs a memset.
EVT - Extended Value Type.
MachinePointerInfo - This class contains a discriminated union of information about pointers in memor...
const unsigned CCMASK_SRST_FOUND
TokenFactor - This node takes multiple tokens as input and produces a single token result...
unsigned countPopulation(T Value)
Count the number of set bits in a value.
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
static cl::opt< AlignMode > Align(cl::desc("Load/store alignment support"), cl::Hidden, cl::init(NoStrictAlign), cl::values(clEnumValN(StrictAlign,"aarch64-strict-align","Disallow all unaligned memory accesses"), clEnumValN(NoStrictAlign,"aarch64-no-strict-align","Allow unaligned memory accesses"), clEnumValEnd))
std::pair< SDValue, SDValue > EmitTargetCodeForStrcmp(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src1, SDValue Src2, MachinePointerInfo Op1PtrInfo, MachinePointerInfo Op2PtrInfo) const override
EmitTargetCodeForStrcmp - Emit target-specific code that performs a strcmp, in cases where that is fa...
const unsigned CCMASK_SRST
LLVM_ATTRIBUTE_UNUSED_RESULT std::enable_if< !is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT, ArrayRef< SDUse > Ops)
Gets or creates the specified node.
std::pair< SDValue, SDValue > EmitTargetCodeForStrnlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, SDValue MaxLength, MachinePointerInfo SrcPtrInfo) const override
std::pair< SDValue, SDValue > EmitTargetCodeForStrcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Dest, SDValue Src, MachinePointerInfo DestPtrInfo, MachinePointerInfo SrcPtrInfo, bool isStpcpy) const override
EmitTargetCodeForStrcpy - Emit target-specific code that performs a strcpy or stpcpy, in cases where that is faster than a libcall.
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)
Sequence
A sequence of states that a pointer may go through in which an objc_retain and objc_release are actua...
EVT getValueType() const
Return the ValueType of the referenced return value.
SDValue getConstant(uint64_t Val, SDLoc DL, EVT VT, bool isTarget=false, bool isOpaque=false)
SDValue getZExtOrTrunc(SDValue Op, SDLoc DL, EVT VT)
Convert Op, which must be of integer type, to the integer type VT, by either zero-extending or trunca...
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 override
EmitTargetCodeForMemcpy - Emit target-specific code that performs a memcpy.
std::pair< SDValue, SDValue > EmitTargetCodeForMemchr(SelectionDAG &DAG, SDLoc DL, SDValue Chain, SDValue Src, SDValue Char, SDValue Length, MachinePointerInfo SrcPtrInfo) const override
EmitTargetCodeForMemchr - Emit target-specific code that performs a memchr, in cases where that is fa...
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...