14 #define DEBUG_TYPE "hexagon-isel"
30 cl::desc(
"Maximum number of uses of a global address such that we still us a"
31 "constant extended instruction"));
62 bool hasNumUsesBelowThresGA(
SDNode *
N)
const;
69 bool foldGlobalAddressImpl(
SDValue &
N,
SDValue &R,
bool ShouldLookForGP);
81 virtual const char *getPassName()
const {
82 return "Hexagon DAG->DAG Pattern Instruction Selection";
87 virtual bool SelectInlineAsmMemoryOperand(
const SDValue &Op,
89 std::vector<SDValue> &OutOps);
112 bool isConstExtProfitable(
SDNode *
N)
const;
117 SDValue XformMskToBitPosU5Imm(uint32_t Imm) {
120 assert(bitPos >= 0 && bitPos < 32 &&
121 "Constant out of range for 32 BitPos Memops");
122 return CurDAG->getTargetConstant(bitPos,
MVT::i32);
127 SDValue XformMskToBitPosU4Imm(uint16_t Imm) {
128 return XformMskToBitPosU5Imm(Imm);
133 SDValue XformMskToBitPosU3Imm(uint8_t Imm) {
134 return XformMskToBitPosU5Imm(Imm);
139 bool ImmIsSingleBit(uint32_t v)
const {
148 inline SDValue XformM5ToU5Imm(
signed Imm) {
149 assert( (Imm >= -31 && Imm <= -1) &&
"Constant out of range for Memops");
150 return CurDAG->getTargetConstant( - Imm,
MVT::i32);
156 inline SDValue XformU7ToU7M1Imm(
signed Imm) {
157 assert((Imm >= 1 && Imm <= 128) &&
"Constant out of range for cmpb op");
158 return CurDAG->getTargetConstant(Imm - 1,
MVT::i8);
162 inline SDValue XformSToSM1Imm(
signed Imm) {
163 return CurDAG->getTargetConstant(Imm - 1,
MVT::i32);
167 inline SDValue XformUToUM1Imm(
unsigned Imm) {
168 assert((Imm >= 1) &&
"Cannot decrement unsigned int less than 1");
169 return CurDAG->getTargetConstant(Imm - 1,
MVT::i32);
173 #include "HexagonGenDAGISel.inc"
183 return new HexagonDAGToDAGISel(TM, OptLevel);
187 const char *
Name =
"Hexagon DAG->DAG Pattern Instruction Selection";
214 return isShiftedInt<11,1>(v);
224 return isShiftedInt<11,2>(v);
234 return isShiftedInt<11,3>(v);
254 return isShiftedUInt<6,1>(v);
264 return isShiftedUInt<6,2>(v);
322 return Hexagon::TFR_RsPd;
324 return Hexagon::AND_pp;
326 return Hexagon::XOR_pp;
328 return Hexagon::OR_pp;
330 return Hexagon::NOT_p;
332 return Hexagon::ANY_pp;
334 return Hexagon::ALL_pp;
336 return Hexagon::VITPACK_pp;
338 return Hexagon::MASK_p;
340 return Hexagon::MUX_rr;
345 return Hexagon::MUX_ri;
350 return Hexagon::MUX_ir;
353 return Hexagon::MUX_ii;
355 return Hexagon::VMUX_prr64;
357 return Hexagon::VALIGN_rrp;
359 return Hexagon::VSPLICE_rrp;
365 if (MemType ==
MVT::i64 && isShiftedInt<11,3>(Offset)) {
368 if (MemType ==
MVT::i32 && isShiftedInt<11,2>(Offset)) {
371 if (MemType ==
MVT::i16 && isShiftedInt<11,1>(Offset)) {
374 if (MemType ==
MVT::i8 && isInt<11>(Offset)) {
395 int64_t Offset = cast<GlobalAddressSDNode>(Base)->getOffset();
399 cast<GlobalAddressSDNode>(Base)->getGlobal();
401 CurDAG->getTargetGlobalAddress(GV, dl, PointerTy, 0);
402 SDNode* NewBase = CurDAG->getMachineNode(Hexagon::CONST32_set,
406 if (LoadedVT ==
MVT::i64) Opcode = Hexagon::LDrid_indexed;
407 else if (LoadedVT ==
MVT::i32) Opcode = Hexagon::LDriw_indexed;
408 else if (LoadedVT ==
MVT::i16) Opcode = Hexagon::LDrih_indexed;
409 else if (LoadedVT ==
MVT::i8) Opcode = Hexagon::LDrib_indexed;
413 SDValue TargetConstOff = CurDAG->getTargetConstant(Offset, PointerTy);
414 SDNode* Result = CurDAG->getMachineNode(Opcode, dl,
422 cast<MachineSDNode>(Result)->setMemRefs(MemOp, MemOp + 1);
423 ReplaceUses(LD, Result);
428 return SelectCode(LD);
441 int32_t Val = cast<ConstantSDNode>(OffsetNode)->getSExtValue();
446 if (SelectADDRriS11_2(N1, CPTmpN1_0, CPTmpN1_1) &&
459 cast<MachineSDNode>(Result_1)->setMemRefs(MemOp, MemOp + 1);
468 ReplaceUses(Froms, Tos, 3);
478 SDNode* Result_3 = CurDAG->getMachineNode(Hexagon::ADD_ri, dl,
483 cast<MachineSDNode>(Result_1)->setMemRefs(MemOp, MemOp + 1);
492 ReplaceUses(Froms, Tos, 3);
495 return SelectCode(LD);
508 int32_t Val = cast<ConstantSDNode>(OffsetNode)->getSExtValue();
513 if (SelectADDRriS11_2(N1, CPTmpN1_0, CPTmpN1_1) &&
522 TargetConstVal, Chain);
523 SDNode *Result_2 = CurDAG->getMachineNode(Hexagon::TFRI, dl,
MVT::i32,
525 SDNode *Result_3 = CurDAG->getMachineNode(Hexagon::COMBINE_rr, dl,
531 cast<MachineSDNode>(Result_1)->setMemRefs(MemOp, MemOp + 1);
540 ReplaceUses(Froms, Tos, 3);
549 Base, TargetConst0, Chain);
550 SDNode *Result_2 = CurDAG->getMachineNode(Hexagon::TFRI, dl,
MVT::i32,
552 SDNode *Result_3 = CurDAG->getMachineNode(Hexagon::COMBINE_rr, dl,
557 SDNode* Result_4 = CurDAG->getMachineNode(Hexagon::ADD_ri, dl,
MVT::i32,
558 Base, TargetConstVal,
562 cast<MachineSDNode>(Result_1)->setMemRefs(MemOp, MemOp + 1);
571 ReplaceUses(Froms, Tos, 3);
575 return SelectCode(LD);
585 int32_t Val = cast<ConstantSDNode>(OffsetNode)->getSExtValue();
597 Opcode = Hexagon::POST_LDrid;
599 Opcode = Hexagon::LDrid;
602 Opcode = Hexagon::POST_LDriw;
604 Opcode = Hexagon::LDriw;
607 Opcode = zextval ? Hexagon::POST_LDriuh : Hexagon::POST_LDrih;
609 Opcode = zextval ? Hexagon::LDriuh : Hexagon::LDrih;
610 }
else if (LoadedVT ==
MVT::i8) {
612 Opcode = zextval ? Hexagon::POST_LDriub : Hexagon::POST_LDrib;
614 Opcode = zextval ? Hexagon::LDriub : Hexagon::LDrib;
621 return SelectIndexedLoadZeroExtend64(LD, Opcode, dl);
626 return SelectIndexedLoadSignExtend64(LD, Opcode, dl);
630 SDNode* Result = CurDAG->getMachineNode(Opcode, dl,
633 TargetConstVal, Chain);
636 cast<MachineSDNode>(Result)->setMemRefs(MemOp, MemOp + 1);
645 ReplaceUses(Froms, Tos, 3);
650 SDNode* Result_1 = CurDAG->getMachineNode(Opcode, dl,
654 SDNode* Result_2 = CurDAG->getMachineNode(Hexagon::ADD_ri, dl,
MVT::i32,
655 Base, TargetConstVal,
659 cast<MachineSDNode>(Result_1)->setMemRefs(MemOp, MemOp + 1);
668 ReplaceUses(Froms, Tos, 3);
682 result = SelectIndexedLoad(LD, dl);
684 result = SelectBaseOffsetLoad(LD, dl);
698 int32_t Val = cast<ConstantSDNode>(OffsetNode)->getSExtValue();
706 SDValue Ops[] = {Base, CurDAG->getTargetConstant(Val,
MVT::i32), Value,
711 if (StoredVT ==
MVT::i64) Opcode = Hexagon::POST_STdri;
712 else if (StoredVT ==
MVT::i32) Opcode = Hexagon::POST_STwri;
713 else if (StoredVT ==
MVT::i16) Opcode = Hexagon::POST_SThri;
714 else if (StoredVT ==
MVT::i8) Opcode = Hexagon::POST_STbri;
722 cast<MachineSDNode>(Result)->setMemRefs(MemOp, MemOp + 1);
724 ReplaceUses(ST, Result);
737 if (StoredVT ==
MVT::i64) Opcode = Hexagon::STrid;
738 else if (StoredVT ==
MVT::i32) Opcode = Hexagon::STriw_indexed;
739 else if (StoredVT ==
MVT::i16) Opcode = Hexagon::STrih;
740 else if (StoredVT ==
MVT::i8) Opcode = Hexagon::STrib;
745 SDNode* Result_1 = CurDAG->getMachineNode(Opcode, dl, MVT::Other, Ops);
747 SDNode* Result_2 = CurDAG->getMachineNode(Hexagon::ADD_ri, dl,
MVT::i32,
753 cast<MachineSDNode>(Result_1)->setMemRefs(MemOp, MemOp + 1);
778 int64_t Offset = cast<GlobalAddressSDNode>(Base)->getOffset();
780 MVT PointerTy = getTargetLowering()->getPointerTy();
782 cast<GlobalAddressSDNode>(Base)->getGlobal();
784 CurDAG->getTargetGlobalAddress(GV, dl, PointerTy, 0);
785 SDNode* NewBase = CurDAG->getMachineNode(Hexagon::CONST32_set,
790 if (StoredVT ==
MVT::i64) Opcode = Hexagon::STrid_indexed;
791 else if (StoredVT ==
MVT::i32) Opcode = Hexagon::STriw_indexed;
792 else if (StoredVT ==
MVT::i16) Opcode = Hexagon::STrih_indexed;
793 else if (StoredVT ==
MVT::i8) Opcode = Hexagon::STrib_indexed;
797 CurDAG->getTargetConstant(Offset,PointerTy),
800 SDNode* Result = CurDAG->getMachineNode(Opcode, dl,
804 cast<MachineSDNode>(Result)->setMemRefs(MemOp, MemOp + 1);
805 ReplaceUses(ST, Result);
811 return SelectCode(ST);
822 return SelectIndexedStore(ST, dl);
825 return SelectBaseOffsetStore(ST, dl);
853 return SelectCode(N);
862 return SelectCode(N);
872 return SelectCode(N);
879 return SelectCode(N);
888 return SelectCode(N);
898 return SelectCode(N);
902 SDNode *Result = CurDAG->getMachineNode(Hexagon::MPY64, dl,
MVT::i64,
904 ReplaceUses(N, Result);
908 return SelectCode(N);
920 if (cast<VTSDNode>(N001)->getVT() ==
MVT::i16) {
929 if (cast<CondCodeSDNode>(N02)->
get() ==
ISD::SETLT) {
938 SDNode *Result = CurDAG->getMachineNode(Hexagon::MAXw_rr, dl,
942 ReplaceUses(N, Result);
953 if (cast<CondCodeSDNode>(N02)->
get() ==
ISD::SETGT) {
962 SDNode *Result = CurDAG->getMachineNode(Hexagon::MINw_rr, dl,
966 ReplaceUses(N, Result);
975 return SelectCode(N);
979 SDNode *HexagonDAGToDAGISel::SelectTruncate(
SDNode *N) {
1000 return SelectCode(N);
1008 return SelectCode(N);
1011 int32_t ShiftConst =
1012 cast<ConstantSDNode>(ShiftOp1.
getNode())->getSExtValue();
1013 if (ShiftConst != 32) {
1014 return SelectCode(N);
1020 return SelectCode(N);
1033 return SelectCode(N);
1042 return SelectCode(N);
1050 TargetConst0, Chain), 0);
1052 return SelectCode(N);
1059 return SelectCode(N);
1067 return SelectCode(N);
1075 TargetConst0, Chain), 0);
1077 return SelectCode(N);
1081 SDNode *Result = CurDAG->getMachineNode(Hexagon::MPY, dl,
MVT::i32,
1083 ReplaceUses(N, Result);
1088 return SelectCode(N);
1105 cast<ConstantSDNode>(Shl_1.
getNode())->getSExtValue();
1107 cast<ConstantSDNode>(Mul_1.
getNode())->getSExtValue();
1108 int32_t ValConst = MulConst << ShlConst;
1109 SDValue Val = CurDAG->getTargetConstant(ValConst,
1112 if (isInt<9>(CN->getSExtValue())) {
1114 CurDAG->getMachineNode(Hexagon::MPYI_ri, dl,
1116 ReplaceUses(N, Result);
1126 cast<ConstantSDNode>(Sub_0.
getNode())->getSExtValue();
1127 if (SubConst == 0) {
1133 cast<ConstantSDNode>(Shl_1.
getNode())->getSExtValue();
1135 cast<ConstantSDNode>(Shl2_1.
getNode())->getSExtValue();
1136 int32_t ValConst = 1 << (ShlConst+Shl2Const);
1139 dyn_cast<ConstantSDNode>(Val.
getNode()))
1140 if (isInt<9>(CN->getSExtValue())) {
1142 CurDAG->getMachineNode(Hexagon::MPYI_ri, dl,
MVT::i32,
1144 ReplaceUses(N, Result);
1154 return SelectCode(N);
1168 SDNode *HexagonDAGToDAGISel::SelectZeroExtend(
SDNode *N) {
1173 cast<ConstantSDNode>(IsIntrinsic->
getOperand(0))->getZExtValue();
1179 SDNode *Result_1 = CurDAG->getMachineNode(Hexagon::TFR_RsPd, dl,
1182 SDNode *Result_2 = CurDAG->getMachineNode(Hexagon::TFRI, dl,
1185 SDNode *Result_3 = CurDAG->getMachineNode(Hexagon::COMBINE_rr, dl,
1189 ReplaceUses(N, Result_3);
1194 SDNode* RsPd = CurDAG->getMachineNode(Hexagon::TFR_RsPd, dl,
1197 ReplaceUses(N, RsPd);
1203 return SelectCode(N);
1211 SDNode *HexagonDAGToDAGISel::SelectIntrinsicWOChain(
SDNode *N) {
1213 unsigned ID = cast<ConstantSDNode>(N->
getOperand(0))->getZExtValue();
1218 if (IntrinsicWithPred) {
1222 const MCInstrDesc &MCID = TII->get(IntrinsicWithPred);
1233 if (RC == &Hexagon::IntRegsRegClass ||
1234 RC == &Hexagon::DoubleRegsRegClass) {
1236 }
else if (RC == &Hexagon::PredRegsRegClass) {
1238 SDNode *PdRs = CurDAG->getMachineNode(Hexagon::TFR_PdRs, dl,
MVT::i1,
1241 }
else if (RC == NULL && (dyn_cast<ConstantSDNode>(Arg) != NULL)) {
1244 int32_t Val = cast<ConstantSDNode>(Arg)->getSExtValue();
1252 SDNode *Result = CurDAG->getMachineNode(IntrinsicWithPred, dl,
1253 ReturnValueVT, Ops);
1254 ReplaceUses(N, Result);
1257 return SelectCode(N);
1263 SDNode *HexagonDAGToDAGISel::SelectConstantFP(
SDNode *N) {
1268 return CurDAG->getMachineNode(Hexagon::TFRI_f, dl,
MVT::f32,
1269 CurDAG->getTargetConstantFP(APF.convertToFloat(),
MVT::f32));
1272 return CurDAG->getMachineNode(Hexagon::CONST64_Float_Real, dl,
MVT::f64,
1273 CurDAG->getTargetConstantFP(APF.convertToDouble(),
MVT::f64));
1276 return SelectCode(N);
1283 SDNode *HexagonDAGToDAGISel::SelectConstant(
SDNode *N) {
1287 int32_t Val = cast<ConstantSDNode>(
N)->getSExtValue();
1291 CurDAG->getMachineNode(Hexagon::TFRI, dl,
MVT::i32,
1292 CurDAG->getTargetConstant(0,
MVT::i32));
1295 SDNode* Pd = CurDAG->getMachineNode(Hexagon::TFR_PdRs, dl,
MVT::i1,
1299 SDNode* NotPd = CurDAG->getMachineNode(Hexagon::NOT_p, dl,
MVT::i1,
1303 Result = CurDAG->getMachineNode(Hexagon::XOR_pp, dl,
MVT::i1,
1310 ReplaceUses(N, Result);
1315 return SelectCode(N);
1325 return SelectCode(N);
1331 return SelectCode(N);
1336 SDNode* Result = CurDAG->getMachineNode(Hexagon::ASR_ADD_rr, dl,
MVT::i32,
1340 ReplaceUses(N, Result);
1355 return SelectConstant(N);
1358 return SelectConstantFP(N);
1361 return SelectAdd(N);
1364 return SelectSHL(N);
1367 return SelectLoad(N);
1370 return SelectStore(N);
1373 return SelectSelect(N);
1376 return SelectTruncate(N);
1379 return SelectMul(N);
1382 return SelectZeroExtend(N);
1385 return SelectIntrinsicWOChain(N);
1388 return SelectCode(N);
1396 bool HexagonDAGToDAGISel::SelectADDRri(
SDValue& Addr,
SDValue &Base,
1403 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(),
MVT::i32);
1404 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1408 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1413 bool HexagonDAGToDAGISel::SelectADDRriS11_0(
SDValue& Addr,
SDValue &Base,
1420 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(),
MVT::i32);
1421 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1425 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1430 bool HexagonDAGToDAGISel::SelectADDRriS11_1(
SDValue& Addr,
SDValue &Base,
1437 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(),
MVT::i32);
1438 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1442 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1447 bool HexagonDAGToDAGISel::SelectADDRriS11_2(
SDValue& Addr,
SDValue &Base,
1454 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(),
MVT::i32);
1455 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1459 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1464 bool HexagonDAGToDAGISel::SelectADDRriU6_0(
SDValue& Addr,
SDValue &Base,
1471 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(),
MVT::i32);
1472 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1476 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1481 bool HexagonDAGToDAGISel::SelectADDRriU6_1(
SDValue& Addr,
SDValue &Base,
1488 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(),
MVT::i32);
1489 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1493 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1498 bool HexagonDAGToDAGISel::SelectADDRriU6_2(
SDValue& Addr,
SDValue &Base,
1505 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(),
MVT::i32);
1506 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1510 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1515 bool HexagonDAGToDAGISel::SelectMEMriS11_2(
SDValue& Addr,
SDValue &Base,
1519 return(SelectADDRriS11_2(Addr, Base, Offset));
1522 return SelectADDRriS11_2(Addr, Base, Offset);
1526 bool HexagonDAGToDAGISel::SelectADDRriS11_3(
SDValue& Addr,
SDValue &Base,
1533 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(),
MVT::i32);
1534 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1538 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1542 bool HexagonDAGToDAGISel::SelectADDRrr(
SDValue &Addr,
SDValue &R1,
1551 if (isInt<13>(CN->getSExtValue()))
1566 bool HexagonDAGToDAGISel::SelectAddr(
SDNode *Op,
SDValue Addr,
1573 Base = CurDAG->getTargetFrameIndex(FIN->getIndex(),
MVT::i32);
1574 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1585 Offset = CurDAG->getTargetConstant(0,
MVT::i32);
1590 bool HexagonDAGToDAGISel::
1591 SelectInlineAsmMemoryOperand(
const SDValue &Op,
char ConstraintCode,
1592 std::vector<SDValue> &OutOps) {
1595 switch (ConstraintCode) {
1598 default:
return true;
1600 if (!SelectAddr(Op.
getNode(), Op, Op0, Op1))
1605 OutOps.push_back(Op0);
1606 OutOps.push_back(Op1);
1610 bool HexagonDAGToDAGISel::isConstExtProfitable(
SDNode *N)
const {
1611 unsigned UseCount = 0;
1616 return (UseCount <= 1);
1623 bool HexagonDAGToDAGISel::hasNumUsesBelowThresGA(
SDNode *N)
const {
1625 "Expecting a target global address");
1635 if (GI == GlobalAddressUseCountMap.end())
1644 inline bool HexagonDAGToDAGISel::foldGlobalAddress(
SDValue &N,
SDValue &R) {
1645 return foldGlobalAddressImpl(N, R,
false);
1651 inline bool HexagonDAGToDAGISel::foldGlobalAddressGP(
SDValue &N,
SDValue &R) {
1652 return foldGlobalAddressImpl(N, R,
true);
1658 bool HexagonDAGToDAGISel::foldGlobalAddressImpl(
SDValue &N,
SDValue &R,
1659 bool ShouldLookForGP) {
1672 !hasNumUsesBelowThresGA(GA))
1674 R = CurDAG->getTargetGlobalAddress(GA->getGlobal(),
static bool IsS11_0_Offset(SDNode *S)
void push_back(const T &Elt)
static PassRegistry * getPassRegistry()
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
const GlobalValue * getGlobal() const
unsigned getOpcode() const
unsigned getNumOperands() const
const SDValue & getOperand(unsigned Num) const
static bool IsS11_1_Offset(SDNode *S)
void setNodeId(int Id)
setNodeId - Set unique node id.
const SDValue & getBasePtr() const
unsigned getResNo() const
get the index which selects a specific result in the SDNode
static bool IsU6_1_Offset(SDNode *S)
const HexagonInstrInfo * TII
#define llvm_unreachable(msg)
EVT getValueType(unsigned ResNo) const
ID
LLVM Calling Convention Representation.
static bool IsU6_2_Offset(SDNode *S)
Simple integer binary arithmetic operators.
const SDValue & getBasePtr() const
EVT getMemoryVT() const
getMemoryVT - Return the type of the in-memory value.
SDNode * getNode() const
get the SDNode which holds the desired result
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
static bool OffsetFitsS11(EVT MemType, int64_t Offset)
initializer< Ty > init(const Ty &Val)
bool isNormalLoad(const SDNode *N)
const SDValue & getOperand(unsigned i) const
static void initializePassOnce(PassRegistry &Registry)
unsigned getOpcode() const
static bool IsS11_3_Offset(SDNode *S)
use_iterator use_begin() const
const SDValue & getValue() const
unsigned CountPopulation_64(uint64_t Value)
const APFloat & getValueAPF() const
ISD::MemIndexedMode getAddressingMode() const
const SDValue & getOffset() const
static bool IsU6_0_Offset(SDNode *S)
const SDValue & getChain() const
MachineMemOperand * getMemOperand() const
static unsigned doesIntrinsicReturnPredicate(unsigned ID)
unsigned Log2_32(uint32_t Value)
ISD::LoadExtType getExtensionType() const
int64_t getSExtValue() const
static use_iterator use_end()
ZERO_EXTEND - Used for integer types, zeroing the new bits.
static bool IsS11_2_Offset(SDNode *S)
bool isValidAutoIncImm(const EVT VT, const int Offset) const
void initializeHexagonDAGToDAGISelPass(PassRegistry &)
const SDValue & getOffset() const
FunctionPass * createHexagonISelDag(HexagonTargetMachine &TM, CodeGenOpt::Level OptLevel)
static unsigned doesIntrinsicContainPredicate(unsigned ID)
LLVM Value Representation.
#define CALL_ONCE_INITIALIZATION(function)
bool isTruncatingStore() const
static cl::opt< unsigned > MaxNumOfUsesForConstExtenders("ga-max-num-uses-for-constant-extenders", cl::Hidden, cl::init(2), cl::desc("Maximum number of uses of a global address such that we still us a""constant extended instruction"))
TRUNCATE - Completely drop the high bits.
iterator find(const KeyT &Val)
void registerPass(const PassInfo &PI, bool ShouldFree=false)
bool isMachineOpcode() const