23 #define DEBUG_TYPE "systemz-isel"
27 struct SystemZAddressingMode {
62 bool IncludesDynAlloc;
64 SystemZAddressingMode(AddrForm form, DispRange dr)
65 :
Form(form), DR(dr),
Base(), Disp(0), Index(),
66 IncludesDynAlloc(
false) {}
69 bool hasIndexField() {
return Form != FormBD; }
72 bool isDynAlloc() {
return Form == FormBDXDynAlloc; }
75 errs() <<
"SystemZAddressingMode " <<
this <<
'\n';
79 Base.getNode()->dump();
83 if (hasIndexField()) {
86 Index.getNode()->dump();
91 errs() <<
" Disp " << Disp;
93 errs() <<
" + ADJDYNALLOC";
99 static uint64_t
allOnes(
unsigned int Count) {
103 return (uint64_t(1) << Count) - 1;
119 struct RxSBGOperands {
138 inline SDValue getImm(
const SDNode *Node, uint64_t Imm)
const {
147 return Subtarget->getInstrInfo();
152 bool expandAddress(SystemZAddressingMode &AM,
bool IsBase)
const;
155 bool selectAddress(
SDValue N, SystemZAddressingMode &AM)
const;
158 void getAddressOperands(
const SystemZAddressingMode &AM,
EVT VT,
160 void getAddressOperands(
const SystemZAddressingMode &AM,
EVT VT,
166 bool selectBDAddr(SystemZAddressingMode::DispRange DR,
SDValue Addr,
172 bool selectMVIAddr(SystemZAddressingMode::DispRange DR,
SDValue Addr,
178 bool selectBDXAddr(SystemZAddressingMode::AddrForm
Form,
179 SystemZAddressingMode::DispRange DR,
SDValue Addr,
193 return selectBDAddr(SystemZAddressingMode::Disp12Only, Addr, Base, Disp);
196 return selectBDAddr(SystemZAddressingMode::Disp12Pair, Addr, Base, Disp);
199 return selectBDAddr(SystemZAddressingMode::Disp20Only, Addr, Base, Disp);
202 return selectBDAddr(SystemZAddressingMode::Disp20Pair, Addr, Base, Disp);
207 return selectMVIAddr(SystemZAddressingMode::Disp12Pair, Addr, Base, Disp);
210 return selectMVIAddr(SystemZAddressingMode::Disp20Pair, Addr, Base, Disp);
216 return selectBDXAddr(SystemZAddressingMode::FormBDXNormal,
217 SystemZAddressingMode::Disp12Only,
218 Addr, Base, Disp, Index);
222 return selectBDXAddr(SystemZAddressingMode::FormBDXNormal,
223 SystemZAddressingMode::Disp12Pair,
224 Addr, Base, Disp, Index);
228 return selectBDXAddr(SystemZAddressingMode::FormBDXDynAlloc,
229 SystemZAddressingMode::Disp12Only,
230 Addr, Base, Disp, Index);
234 return selectBDXAddr(SystemZAddressingMode::FormBDXNormal,
235 SystemZAddressingMode::Disp20Only,
236 Addr, Base, Disp, Index);
240 return selectBDXAddr(SystemZAddressingMode::FormBDXNormal,
241 SystemZAddressingMode::Disp20Only128,
242 Addr, Base, Disp, Index);
246 return selectBDXAddr(SystemZAddressingMode::FormBDXNormal,
247 SystemZAddressingMode::Disp20Pair,
248 Addr, Base, Disp, Index);
252 return selectBDXAddr(SystemZAddressingMode::FormBDXLA,
253 SystemZAddressingMode::Disp12Pair,
254 Addr, Base, Disp, Index);
258 return selectBDXAddr(SystemZAddressingMode::FormBDXLA,
259 SystemZAddressingMode::Disp20Pair,
260 Addr, Base, Disp, Index);
273 bool detectOrAndInsertion(
SDValue &
Op, uint64_t InsertMask)
const;
277 bool refineRxSBGMask(RxSBGOperands &RxSBG, uint64_t
Mask)
const;
281 bool expandRxSBG(RxSBGOperands &RxSBG)
const;
291 bool tryRISBGZero(
SDNode *N);
295 bool tryRxSBG(
SDNode *N,
unsigned Opcode);
304 void splitLargeImmediate(
unsigned Opcode,
SDNode *Node,
SDValue Op0,
305 uint64_t UpperVal, uint64_t LowerVal);
308 bool tryGather(
SDNode *N,
unsigned Opcode);
326 bool storeLoadCanUseMVC(
SDNode *N)
const;
331 bool storeLoadCanUseBlockBinary(
SDNode *N,
unsigned I)
const;
344 return "SystemZ DAG->DAG Pattern Instruction Selection";
349 bool SelectInlineAsmMemoryOperand(
const SDValue &Op,
unsigned ConstraintID,
350 std::vector<SDValue> &OutOps)
override;
353 #include "SystemZGenDAGISel.inc"
359 return new SystemZDAGToDAGISel(TM, OptLevel);
365 static bool selectDisp(SystemZAddressingMode::DispRange DR, int64_t Val) {
367 case SystemZAddressingMode::Disp12Only:
368 return isUInt<12>(Val);
370 case SystemZAddressingMode::Disp12Pair:
371 case SystemZAddressingMode::Disp20Only:
372 case SystemZAddressingMode::Disp20Pair:
373 return isInt<20>(Val);
375 case SystemZAddressingMode::Disp20Only128:
376 return isInt<20>(Val) && isInt<20>(Val + 8);
396 if (AM.isDynAlloc() && !AM.IncludesDynAlloc) {
398 AM.IncludesDynAlloc =
true;
408 if (AM.hasIndexField() && !AM.Index.getNode()) {
418 static bool expandDisp(SystemZAddressingMode &AM,
bool IsBase,
421 int64_t TestDisp = AM.Disp + Op1;
433 bool SystemZDAGToDAGISel::expandAddress(SystemZAddressingMode &AM,
435 SDValue N = IsBase ? AM.Base : AM.Index;
441 if (Opcode ==
ISD::ADD || CurDAG->isBaseWithConstantOffset(N)) {
455 cast<ConstantSDNode>(Op0)->getSExtValue());
458 cast<ConstantSDNode>(Op1)->getSExtValue());
468 cast<GlobalAddressSDNode>(Anchor)->
getOffset());
476 static bool isValidDisp(SystemZAddressingMode::DispRange DR, int64_t Val) {
479 case SystemZAddressingMode::Disp12Only:
480 case SystemZAddressingMode::Disp20Only:
481 case SystemZAddressingMode::Disp20Only128:
484 case SystemZAddressingMode::Disp12Pair:
486 return isUInt<12>(Val);
488 case SystemZAddressingMode::Disp20Pair:
490 return !isUInt<12>(Val);
514 if (isUInt<12>(Disp))
533 unsigned IndexOpcode = Index->
getOpcode();
548 bool SystemZDAGToDAGISel::selectAddress(
SDValue Addr,
549 SystemZAddressingMode &AM)
const {
557 cast<ConstantSDNode>(Addr)->getSExtValue()))
565 while (expandAddress(AM,
true) ||
566 (AM.Index.getNode() && expandAddress(AM,
false)))
570 if (AM.Form == SystemZAddressingMode::FormBDXLA &&
571 !
shouldUseLA(AM.Base.getNode(), AM.Disp, AM.Index.getNode()))
579 if (AM.isDynAlloc() && !AM.IncludesDynAlloc)
599 void SystemZDAGToDAGISel::getAddressOperands(
const SystemZAddressingMode &AM,
605 Base = CurDAG->getRegister(0, VT);
608 int64_t
FrameIndex = cast<FrameIndexSDNode>(Base)->getIndex();
609 Base = CurDAG->getTargetFrameIndex(FrameIndex, VT);
613 "Unexpected truncation");
621 Disp = CurDAG->getTargetConstant(AM.Disp,
SDLoc(Base), VT);
624 void SystemZDAGToDAGISel::getAddressOperands(
const SystemZAddressingMode &AM,
628 getAddressOperands(AM, VT, Base, Disp);
633 Index = CurDAG->getRegister(0, VT);
636 bool SystemZDAGToDAGISel::selectBDAddr(SystemZAddressingMode::DispRange DR,
639 SystemZAddressingMode AM(SystemZAddressingMode::FormBD, DR);
640 if (!selectAddress(Addr, AM))
643 getAddressOperands(AM, Addr.
getValueType(), Base, Disp);
647 bool SystemZDAGToDAGISel::selectMVIAddr(SystemZAddressingMode::DispRange DR,
650 SystemZAddressingMode AM(SystemZAddressingMode::FormBDXNormal, DR);
651 if (!selectAddress(Addr, AM) || AM.Index.getNode())
654 getAddressOperands(AM, Addr.
getValueType(), Base, Disp);
658 bool SystemZDAGToDAGISel::selectBDXAddr(SystemZAddressingMode::AddrForm
Form,
659 SystemZAddressingMode::DispRange DR,
662 SystemZAddressingMode AM(Form, DR);
663 if (!selectAddress(Addr, AM))
666 getAddressOperands(AM, Addr.
getValueType(), Base, Disp, Index);
670 bool SystemZDAGToDAGISel::selectBDVAddr12Only(
SDValue Addr,
SDValue Elem,
675 if (selectBDXAddr12Only(Addr, Regs[0], Disp, Regs[1]) &&
676 Regs[0].getNode() && Regs[1].getNode()) {
677 for (
unsigned int I = 0;
I < 2; ++
I) {
694 bool SystemZDAGToDAGISel::detectOrAndInsertion(
SDValue &
Op,
695 uint64_t InsertMask)
const {
708 if (InsertMask & AndMask)
714 if (Used != (AndMask | InsertMask)) {
716 CurDAG->computeKnownBits(Op.
getOperand(0), Known);
725 bool SystemZDAGToDAGISel::refineRxSBGMask(RxSBGOperands &RxSBG,
726 uint64_t
Mask)
const {
728 if (RxSBG.Rotate != 0)
729 Mask = (Mask << RxSBG.Rotate) | (Mask >> (64 - RxSBG.Rotate));
731 if (TII->
isRxSBGMask(Mask, RxSBG.BitSize, RxSBG.Start, RxSBG.End)) {
741 if (RxSBG.Rotate != 0)
742 Mask = ((Mask << RxSBG.Rotate) | (Mask >> (64 - RxSBG.Rotate)));
743 return (Mask & RxSBG.Mask) != 0;
746 bool SystemZDAGToDAGISel::expandRxSBG(RxSBGOperands &RxSBG)
const {
751 if (RxSBG.Opcode == SystemZ::RNSBG)
754 uint64_t Mask =
allOnes(BitSize);
755 if (!refineRxSBGMask(RxSBG, Mask))
761 if (RxSBG.Opcode == SystemZ::RNSBG)
769 uint64_t Mask = MaskNode->getZExtValue();
770 if (!refineRxSBGMask(RxSBG, Mask)) {
775 CurDAG->computeKnownBits(Input, Known);
777 if (!refineRxSBGMask(RxSBG, Mask))
785 if (RxSBG.Opcode != SystemZ::RNSBG)
793 uint64_t Mask = ~MaskNode->getZExtValue();
794 if (!refineRxSBGMask(RxSBG, Mask)) {
799 CurDAG->computeKnownBits(Input, Known);
801 if (!refineRxSBGMask(RxSBG, Mask))
816 RxSBG.Rotate = (RxSBG.Rotate + CountNode->getZExtValue()) & 63;
827 if (RxSBG.Opcode != SystemZ::RNSBG) {
830 if (!refineRxSBGMask(RxSBG,
allOnes(InnerBitSize)))
856 if (Count < 1 || Count >= BitSize)
859 if (RxSBG.Opcode == SystemZ::RNSBG) {
866 if (!refineRxSBGMask(RxSBG,
allOnes(BitSize - Count) << Count))
870 RxSBG.Rotate = (RxSBG.Rotate + Count) & 63;
883 if (Count < 1 || Count >= BitSize)
886 if (RxSBG.Opcode == SystemZ::RNSBG || Opcode ==
ISD::SRA) {
894 if (!refineRxSBGMask(RxSBG,
allOnes(BitSize - Count)))
898 RxSBG.Rotate = (RxSBG.Rotate - Count) & 63;
908 SDNode *N = CurDAG->getMachineNode(TargetOpcode::IMPLICIT_DEF, DL, VT);
915 return CurDAG->getTargetInsertSubreg(SystemZ::subreg_l32,
918 return CurDAG->getTargetExtractSubreg(SystemZ::subreg_l32, DL, VT, N);
923 bool SystemZDAGToDAGISel::tryRISBGZero(
SDNode *N) {
928 RxSBGOperands RISBG(SystemZ::RISBG,
SDValue(N, 0));
930 while (expandRxSBG(RISBG))
948 if (RISBG.Rotate == 0) {
949 bool PreferAnd =
false;
955 else if (RISBG.Mask == 0xff ||
956 RISBG.Mask == 0xffff ||
957 RISBG.Mask == 0x7fffffff ||
963 else if (
auto *
Load = dyn_cast<LoadSDNode>(RISBG.Input)) {
967 RISBG.Mask == 0xffffff00 &&
968 Subtarget->hasLoadAndZeroRightmostByte())
975 SDValue In = convertTo(DL, VT, RISBG.Input);
976 SDValue Mask = CurDAG->getConstant(RISBG.Mask, DL, VT);
990 unsigned Opcode = SystemZ::RISBG;
992 if (Subtarget->hasMiscellaneousExtensions())
993 Opcode = SystemZ::RISBGN;
995 if (VT ==
MVT::i32 && Subtarget->hasHighWord()) {
996 Opcode = SystemZ::RISBMux;
1002 getUNDEF(DL, OpcodeVT),
1003 convertTo(DL, OpcodeVT, RISBG.Input),
1004 CurDAG->getTargetConstant(RISBG.Start, DL,
MVT::i32),
1005 CurDAG->getTargetConstant(RISBG.End | 128, DL,
MVT::i32),
1006 CurDAG->getTargetConstant(RISBG.Rotate, DL,
MVT::i32)
1009 DL, VT,
SDValue(CurDAG->getMachineNode(Opcode, DL, OpcodeVT, Ops), 0));
1010 ReplaceUses(N, New.
getNode());
1011 CurDAG->RemoveDeadNode(N);
1015 bool SystemZDAGToDAGISel::tryRxSBG(
SDNode *N,
unsigned Opcode) {
1022 RxSBGOperands RxSBG[] = {
1026 unsigned Count[] = { 0, 0 };
1027 for (
unsigned I = 0;
I < 2; ++
I)
1028 while (expandRxSBG(RxSBG[
I]))
1037 if (Count[0] == 0 && Count[1] == 0)
1041 unsigned I = Count[0] > Count[1] ? 0 : 1;
1045 if (Opcode == SystemZ::ROSBG && (RxSBG[I].Mask & 0xff) == 0)
1046 if (
auto *
Load = dyn_cast<LoadSDNode>(Op0.
getNode()))
1052 if (Opcode == SystemZ::ROSBG && detectOrAndInsertion(Op0, RxSBG[I].Mask)) {
1053 Opcode = SystemZ::RISBG;
1055 if (Subtarget->hasMiscellaneousExtensions())
1056 Opcode = SystemZ::RISBGN;
1061 convertTo(DL,
MVT::i64, RxSBG[I].Input),
1062 CurDAG->getTargetConstant(RxSBG[I].Start, DL,
MVT::i32),
1063 CurDAG->getTargetConstant(RxSBG[I].
End, DL,
MVT::i32),
1064 CurDAG->getTargetConstant(RxSBG[I].Rotate, DL,
MVT::i32)
1067 DL, VT,
SDValue(CurDAG->getMachineNode(Opcode, DL,
MVT::i64, Ops), 0));
1068 ReplaceNode(N, New.
getNode());
1072 void SystemZDAGToDAGISel::splitLargeImmediate(
unsigned Opcode,
SDNode *Node,
1073 SDValue Op0, uint64_t UpperVal,
1074 uint64_t LowerVal) {
1079 Upper = CurDAG->getNode(Opcode, DL, VT, Op0, Upper);
1100 SDValue Or = CurDAG->getNode(Opcode, DL, VT, Upper, Lower);
1102 ReplaceUses(Node, Or.
getNode());
1103 CurDAG->RemoveDeadNode(Node);
1108 bool SystemZDAGToDAGISel::tryGather(
SDNode *N,
unsigned Opcode) {
1114 unsigned Elem = ElemN->getZExtValue();
1122 if (
Load->getMemoryVT().getSizeInBits() !=
1123 Load->getValueType(0).getSizeInBits())
1127 if (!selectBDVAddr12Only(
Load->getBasePtr(), ElemV, Base, Disp, Index) ||
1134 CurDAG->getTargetConstant(Elem, DL,
MVT::i32),
Load->getChain()
1138 ReplaceNode(N, Res);
1142 bool SystemZDAGToDAGISel::tryScatter(
StoreSDNode *
Store,
unsigned Opcode) {
1156 unsigned Elem = ElemN->getZExtValue();
1161 if (!selectBDVAddr12Only(Store->
getBasePtr(), ElemV, Base, Disp, Index) ||
1167 Vec, Base, Disp, Index, CurDAG->getTargetConstant(Elem, DL,
MVT::i32),
1170 ReplaceNode(Store, CurDAG->getMachineNode(Opcode, DL,
MVT::Other, Ops));
1174 bool SystemZDAGToDAGISel::canUseBlockOperation(
StoreSDNode *Store,
1198 if (V1 == V2 && End1 == End2)
1205 bool SystemZDAGToDAGISel::storeLoadCanUseMVC(
SDNode *N)
const {
1206 auto *Store = cast<StoreSDNode>(
N);
1207 auto *Load = cast<LoadSDNode>(Store->
getValue());
1212 if (Size > 1 && Size <= 8) {
1221 return canUseBlockOperation(Store, Load);
1224 bool SystemZDAGToDAGISel::storeLoadCanUseBlockBinary(
SDNode *N,
1226 auto *StoreA = cast<StoreSDNode>(
N);
1227 auto *LoadA = cast<LoadSDNode>(StoreA->getValue().getOperand(1 - I));
1228 auto *LoadB = cast<LoadSDNode>(StoreA->getValue().getOperand(I));
1229 return !LoadA->isVolatile() && canUseBlockOperation(StoreA, LoadB);
1247 if (tryRxSBG(Node, SystemZ::ROSBG))
1253 if (tryRxSBG(Node, SystemZ::RXSBG))
1260 if (
auto *Op1 = dyn_cast<ConstantSDNode>(Node->
getOperand(1))) {
1261 uint64_t Val = Op1->getZExtValue();
1263 splitLargeImmediate(Opcode, Node, Node->
getOperand(0),
1272 if (tryRxSBG(Node, SystemZ::RNSBG))
1279 if (tryRISBGZero(Node))
1287 uint64_t Val = cast<ConstantSDNode>(Node)->getZExtValue();
1302 (Subtarget->hasLoadStoreOnCond2() &&
1305 isInt<16>(cast<ConstantSDNode>(Op1)->getSExtValue()) &&
1307 isInt<16>(cast<ConstantSDNode>(Op0)->getSExtValue())))) {
1310 uint64_t ConstCCValid =
1311 cast<ConstantSDNode>(CCValid.
getNode())->getZExtValue();
1312 uint64_t ConstCCMask =
1313 cast<ConstantSDNode>(CCMask.
getNode())->getZExtValue();
1315 CCMask = CurDAG->getConstant(ConstCCValid ^ ConstCCMask,
SDLoc(Node),
1318 Node = CurDAG->UpdateNodeOperands(Node, Op1, Op0, CCValid, CCMask, Op4);
1326 if (ElemBitSize == 32) {
1327 if (tryGather(Node, SystemZ::VGEF))
1329 }
else if (ElemBitSize == 64) {
1330 if (tryGather(Node, SystemZ::VGEG))
1337 auto *Store = cast<StoreSDNode>(Node);
1339 if (ElemBitSize == 32) {
1340 if (tryScatter(Store, SystemZ::VSCEF))
1342 }
else if (ElemBitSize == 64) {
1343 if (tryScatter(Store, SystemZ::VSCEG))
1353 bool SystemZDAGToDAGISel::
1354 SelectInlineAsmMemoryOperand(
const SDValue &Op,
1355 unsigned ConstraintID,
1356 std::vector<SDValue> &OutOps) {
1357 SystemZAddressingMode::AddrForm
Form;
1358 SystemZAddressingMode::DispRange DispRange;
1361 switch(ConstraintID) {
1367 Form = SystemZAddressingMode::FormBD;
1368 DispRange = SystemZAddressingMode::Disp12Only;
1372 Form = SystemZAddressingMode::FormBDXNormal;
1373 DispRange = SystemZAddressingMode::Disp12Only;
1377 Form = SystemZAddressingMode::FormBD;
1378 DispRange = SystemZAddressingMode::Disp20Only;
1384 Form = SystemZAddressingMode::FormBDXNormal;
1385 DispRange = SystemZAddressingMode::Disp20Only;
1389 if (selectBDXAddr(Form, DispRange, Op, Base, Disp, Index)) {
1391 Subtarget->getRegisterInfo()->getPointerRegClass(*MF);
1400 SDValue(CurDAG->getMachineNode(TargetOpcode::COPY_TO_REGCLASS,
1408 SDValue(CurDAG->getMachineNode(TargetOpcode::COPY_TO_REGCLASS,
1413 OutOps.push_back(Base);
1414 OutOps.push_back(Disp);
1415 OutOps.push_back(Index);
static bool isImmHF(uint64_t Val)
SDValue getValue(unsigned R) const
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
static void insertDAGNode(SelectionDAG *DAG, SDNode *Pos, SDValue N)
uint64_t getZExtValue() const
Get zero extended value.
bool hasOneUse() const
Return true if there is exactly one use of this node.
static bool isImmLF(uint64_t Val)
static bool maskMatters(RxSBGOperands &RxSBG, uint64_t Mask)
unsigned getOpcode() const
Return the SelectionDAG opcode value for this node.
unsigned getID() const
Return the register class ID number.
unsigned getValueSizeInBits() const
Returns the size of the value in bits.
constexpr bool isInt< 16 >(int64_t x)
const SDValue & getOperand(unsigned Num) const
void setNodeId(int Id)
Set unique node id.
int64_t getSrcValueOffset() const
static uint64_t allOnes(unsigned int Count)
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
const HexagonInstrInfo * TII
Shift and rotation operations.
EVT getValueType(unsigned ResNo) const
Return the type of a specified result.
FunctionPass * createSystemZISelDag(SystemZTargetMachine &TM, CodeGenOpt::Level OptLevel)
bool isInteger() const
Return true if this is an integer or a vector integer type.
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
Simple integer binary arithmetic operators.
static bool expandAdjDynAlloc(SystemZAddressingMode &AM, bool IsBase, SDValue Value)
const SDValue & getBasePtr() const
static Error getOffset(const SymbolRef &Sym, SectionRef Sec, uint64_t &Result)
EVT getMemoryVT() const
Return the type of the in-memory value.
static bool shouldUseLA(SDNode *Base, int64_t Disp, SDNode *Index)
This class is used to represent ISD::STORE nodes.
SDNode * getNode() const
get the SDNode which holds the desired result
unsigned getScalarSizeInBits() const
unsigned getStoreSize() const
Return the number of bytes overwritten by a store of the specified value type.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
const SDValue & getOperand(unsigned i) const
static bool expandDisp(SystemZAddressingMode &AM, bool IsBase, SDValue Op0, uint64_t Op1)
INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR with the element at IDX replaced with VAL...
void RepositionNode(allnodes_iterator Position, SDNode *N)
Move node N in the AllNodes list to be immediately before the given iterator Position.
static const unsigned End
static void changeComponent(SystemZAddressingMode &AM, bool IsBase, SDValue Value)
unsigned getOpcode() const
FunctionPass class - This class is used to implement most global optimizations.
self_iterator getIterator()
bool isPCREL(unsigned Opcode)
const SDValue & getValue() const
bool isRxSBGMask(uint64_t Mask, unsigned BitSize, unsigned &Start, unsigned &End) const
Representation for a specific memory location.
constexpr bool isInt< 32 >(int64_t x)
void dump() const
Dump this node, for debugging.
EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR identified by the (potentially...
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
const SDValue & getChain() const
MachineMemOperand * getMemOperand() const
Return a MachineMemOperand object describing the memory reference performed by operation.
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
bool isDereferenceable() const
Represents one node in the SelectionDAG.
SelectionDAGISel - This is the common base class used for SelectionDAG-based pattern-matching instruc...
AAMDNodes getAAInfo() const
Returns the AA info that describes the dereference.
Target - Wrapper for Target specific information.
const Value * getValue() const
Return the base address of the memory access.
ZERO_EXTEND - Used for integer types, zeroing the new bits.
ANY_EXTEND - Used for integer types. The high bits are undefined.
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
llvm_unreachable("Unknown RegBank!")
Bitwise operators - logical and, logical or, logical xor.
SIGN_EXTEND_INREG - This operator atomically performs a SHL/SRA pair to sign extend a small value in ...
LOAD and STORE have token chains as their first operand, then the same operands as an LLVM load/store...
unsigned getSizeInBits() const
Return the size of the specified value type in bits.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
int getNodeId() const
Return the unique node id.
EVT getValueType() const
Return the ValueType of the referenced return value.
static bool selectDisp(SystemZAddressingMode::DispRange DR, int64_t Val)
This class is used to form a handle around another node that is persistent and is updated across invo...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool expandIndex(SystemZAddressingMode &AM, SDValue Base, SDValue Index)
LLVM Value Representation.
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
static bool isValidDisp(SystemZAddressingMode::DispRange DR, int64_t Val)
StringRef - Represent a constant reference to a string, i.e.
TRUNCATE - Completely drop the high bits.
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...
EVT changeVectorElementTypeToInteger() const
Return a vector with the same number of elements as this vector, but with the element type converted ...
bool isMachineOpcode() const
Test if this node has a post-isel opcode, directly corresponding to a MachineInstr opcode...
uint64_t getZExtValue() const
unsigned getVectorNumElements() const
Given a vector type, return the number of elements it contains.
This class is used to represent ISD::LOAD nodes.