20 #define GET_INSTRINFO_CTOR_DTOR
21 #define GET_INSTRMAP_INFO
22 #include "SystemZGenInstrInfo.inc"
27 static uint64_t
allOnes(
unsigned int Count) {
28 return Count == 0 ? 0 : (uint64_t(1) << (Count - 1) << 1) - 1;
34 if (SystemZ::GRH32BitRegClass.contains(Reg))
36 assert(SystemZ::GR32BitRegClass.contains(Reg) &&
"Invalid GRX32");
41 void SystemZInstrInfo::anchor() {}
51 unsigned NewOpcode)
const {
58 MBB->
insert(MI, EarlierMI);
63 HighRegOp.
setReg(RI.getSubReg(HighRegOp.
getReg(), SystemZ::subreg_h64));
64 LowRegOp.
setReg(RI.getSubReg(LowRegOp.
getReg(), SystemZ::subreg_l64));
75 assert(HighOpcode && LowOpcode &&
"Both offsets should be in range");
77 EarlierMI->
setDesc(
get(HighOpcode));
78 MI->setDesc(
get(LowOpcode));
92 assert(NewOpcode &&
"No support for huge argument lists yet");
93 MI->setDesc(
get(NewOpcode));
103 void SystemZInstrInfo::expandRIPseudo(
MachineInstr *MI,
unsigned LowOpcode,
105 bool ConvertHigh)
const {
108 MI->
setDesc(
get(IsHigh ? HighOpcode : LowOpcode));
109 if (IsHigh && ConvertHigh)
117 void SystemZInstrInfo::expandRIEPseudo(
MachineInstr *MI,
unsigned LowOpcode,
119 unsigned HighOpcode)
const {
124 if (!DestIsHigh && !SrcIsHigh)
128 DestReg, SrcReg, SystemZ::LR, 32,
130 MI->
setDesc(
get(DestIsHigh ? HighOpcode : LowOpcode));
138 void SystemZInstrInfo::expandRXYPseudo(
MachineInstr *MI,
unsigned LowOpcode,
139 unsigned HighOpcode)
const {
149 void SystemZInstrInfo::expandZExtPseudo(
MachineInstr *MI,
unsigned LowOpcode,
150 unsigned Size)
const {
165 unsigned SrcReg,
unsigned LowLowOpcode,
166 unsigned Size,
bool KillSrc)
const {
170 if (DestIsHigh && SrcIsHigh)
171 Opcode = SystemZ::RISBHH;
172 else if (DestIsHigh && !SrcIsHigh)
173 Opcode = SystemZ::RISBHL;
174 else if (!DestIsHigh && SrcIsHigh)
175 Opcode = SystemZ::RISBLH;
177 BuildMI(MBB, MBBI, DL,
get(LowLowOpcode), DestReg)
181 unsigned Rotate = (DestIsHigh != SrcIsHigh ? 32 : 0);
182 BuildMI(MBB, MBBI, DL,
get(Opcode), DestReg)
218 int &SrcFrameIndex)
const {
236 DestFrameIndex = FI1;
245 bool AllowModify)
const {
251 while (I != MBB.
begin()) {
253 if (I->isDebugValue())
258 if (!isUnpredicatedTerminator(I))
313 assert(Cond.
size() == 2 && TBB &&
"Should have seen a conditional branch");
321 unsigned OldCCValid = Cond[0].getImm();
322 unsigned OldCCMask = Cond[1].getImm();
323 if (OldCCValid == Branch.
CCValid && OldCCMask == Branch.
CCMask)
338 while (I != MBB.
begin()) {
340 if (I->isDebugValue())
347 I->eraseFromParent();
357 assert(Cond.
size() == 2 &&
"Invalid condition");
358 Cond[1].setImm(Cond[1].getImm() ^ Cond[0].getImm());
372 assert(TBB &&
"InsertBranch must not be told to insert a fallthrough");
373 assert((Cond.
size() == 2 || Cond.
size() == 0) &&
374 "SystemZ branch conditions have one component!");
378 assert(!FBB &&
"Unconditional branch with multiple successors!");
385 unsigned CCValid = Cond[0].getImm();
386 unsigned CCMask = Cond[1].getImm();
387 BuildMI(&MBB, DL,
get(SystemZ::BRC))
400 unsigned &SrcReg,
unsigned &SrcReg2,
401 int &Mask,
int &
Value)
const {
402 assert(MI->
isCompare() &&
"Caller should have checked for a comparison");
447 if (RLL && RLL->
getOpcode() == SystemZ::LGFR) {
451 if (!RLL || !
isShift(RLL, SystemZ::RLL, 31))
466 for (++MBBI; MBBI != MBBE; ++MBBI) {
484 unsigned SrcReg,
unsigned SrcReg2,
487 assert(!SrcReg2 &&
"Only optimizing constant comparisons so far");
500 case SystemZ::LR:
return SystemZ::LOCR;
501 case SystemZ::LGR:
return SystemZ::LOCGR;
516 unsigned NumCycles,
unsigned ExtraPredCycles,
519 return NumCycles == 1;
524 unsigned NumCyclesT,
unsigned ExtraPredCyclesT,
526 unsigned NumCyclesF,
unsigned ExtraPredCyclesF,
535 assert(Pred.
size() == 2 &&
"Invalid condition");
536 unsigned CCValid = Pred[0].getImm();
537 unsigned CCMask = Pred[1].getImm();
538 assert(CCMask > 0 && CCMask < 15 &&
"Invalid predicate");
544 .addImm(CCValid).
addImm(CCMask)
555 unsigned DestReg,
unsigned SrcReg,
556 bool KillSrc)
const {
558 if (SystemZ::GR128BitRegClass.contains(DestReg, SrcReg)) {
559 copyPhysReg(MBB, MBBI, DL, RI.getSubReg(DestReg, SystemZ::subreg_h64),
560 RI.getSubReg(SrcReg, SystemZ::subreg_h64), KillSrc);
561 copyPhysReg(MBB, MBBI, DL, RI.getSubReg(DestReg, SystemZ::subreg_l64),
562 RI.getSubReg(SrcReg, SystemZ::subreg_l64), KillSrc);
566 if (SystemZ::GRX32BitRegClass.contains(DestReg, SrcReg)) {
567 emitGRX32Move(MBB, MBBI, DL, DestReg, SrcReg, SystemZ::LR, 32, KillSrc);
573 if (SystemZ::GR64BitRegClass.contains(DestReg, SrcReg))
574 Opcode = SystemZ::LGR;
575 else if (SystemZ::FP32BitRegClass.contains(DestReg, SrcReg))
576 Opcode = SystemZ::LER;
577 else if (SystemZ::FP64BitRegClass.contains(DestReg, SrcReg))
579 else if (SystemZ::FP128BitRegClass.contains(DestReg, SrcReg))
580 Opcode = SystemZ::LXR;
584 BuildMI(MBB, MBBI, DL,
get(Opcode), DestReg)
591 unsigned SrcReg,
bool isKill,
599 unsigned LoadOpcode, StoreOpcode;
608 unsigned DestReg,
int FrameIdx,
615 unsigned LoadOpcode, StoreOpcode;
625 return ((MCID.
TSFlags & Flag) &&
632 LogicOp() : RegSize(0), ImmLSB(0), ImmSize(0) {}
633 LogicOp(
unsigned regSize,
unsigned immLSB,
unsigned immSize)
634 : RegSize(regSize), ImmLSB(immLSB), ImmSize(immSize) {}
636 operator bool()
const {
return RegSize; }
638 unsigned RegSize, ImmLSB, ImmSize;
644 case SystemZ::NILMux:
return LogicOp(32, 0, 16);
645 case SystemZ::NIHMux:
return LogicOp(32, 16, 16);
646 case SystemZ::NILL64:
return LogicOp(64, 0, 16);
647 case SystemZ::NILH64:
return LogicOp(64, 16, 16);
648 case SystemZ::NIHL64:
return LogicOp(64, 32, 16);
649 case SystemZ::NIHH64:
return LogicOp(64, 48, 16);
650 case SystemZ::NIFMux:
return LogicOp(32, 0, 32);
651 case SystemZ::NILF64:
return LogicOp(64, 0, 32);
652 case SystemZ::NIHF64:
return LogicOp(64, 32, 32);
653 default:
return LogicOp();
664 for (
unsigned I = 1;
I < NumOps; ++
I) {
691 unsigned DestReg = Dest.
getReg();
692 unsigned SrcReg = Src.
getReg();
696 if (Opcode == SystemZ::AHIMux &&
704 int ThreeOperandOpcode = SystemZ::getThreeOperandOpcode(Opcode);
705 if (ThreeOperandOpcode >= 0) {
712 for (
unsigned I = 2;
I < NumOps; ++
I)
726 if (
And.RegSize == 64)
727 NewOpcode = SystemZ::RISBG;
729 NewOpcode = SystemZ::RISBMux;
755 if (Ops.
size() == 2 && Ops[0] == 0 && Ops[1] == 1) {
756 if ((Opcode == SystemZ::LA || Opcode == SystemZ::LAY) &&
771 unsigned OpNum = Ops[0];
774 "Invalid size combination");
776 if ((Opcode == SystemZ::AHI || Opcode == SystemZ::AGHI) &&
780 Opcode = (Opcode == SystemZ::AHI ? SystemZ::ASI : SystemZ::AGSI);
786 if (Opcode == SystemZ::LGDR || Opcode == SystemZ::LDGR) {
787 bool Op0IsGPR = (Opcode == SystemZ::LGDR);
788 bool Op1IsGPR = (Opcode == SystemZ::LDGR);
792 unsigned StoreOpcode = Op1IsGPR ? SystemZ::STG : SystemZ::STD;
800 unsigned LoadOpcode = Op0IsGPR ? SystemZ::LG :
SystemZ::LD;
842 int MemOpcode = SystemZ::getMemOpcode(Opcode);
843 if (MemOpcode >= 0) {
845 if (OpNum == NumOps - 1) {
848 assert(AccessBytes != 0 &&
"Size of access should be known");
849 assert(AccessBytes <= Size &&
"Access outside the frame index");
850 uint64_t Offset = Size - AccessBytes;
852 for (
unsigned I = 0;
I < OpNum; ++
I)
873 switch (MI->getOpcode()) {
875 splitMove(MI, SystemZ::LG);
879 splitMove(MI, SystemZ::STG);
887 splitMove(MI, SystemZ::STD);
891 expandRXYPseudo(MI, SystemZ::LB, SystemZ::LBH);
895 expandRXYPseudo(MI, SystemZ::LH, SystemZ::LHH);
898 case SystemZ::LLCRMux:
899 expandZExtPseudo(MI, SystemZ::LLCR, 8);
902 case SystemZ::LLHRMux:
903 expandZExtPseudo(MI, SystemZ::LLHR, 16);
906 case SystemZ::LLCMux:
907 expandRXYPseudo(MI, SystemZ::LLC, SystemZ::LLCH);
910 case SystemZ::LLHMux:
911 expandRXYPseudo(MI, SystemZ::LLH, SystemZ::LLHH);
915 expandRXYPseudo(MI, SystemZ::L, SystemZ::LFH);
918 case SystemZ::STCMux:
919 expandRXYPseudo(MI, SystemZ::STC, SystemZ::STCH);
922 case SystemZ::STHMux:
923 expandRXYPseudo(MI, SystemZ::STH, SystemZ::STHH);
930 case SystemZ::LHIMux:
931 expandRIPseudo(MI, SystemZ::LHI, SystemZ::IIHF,
true);
934 case SystemZ::IIFMux:
935 expandRIPseudo(MI, SystemZ::IILF, SystemZ::IIHF,
false);
938 case SystemZ::IILMux:
939 expandRIPseudo(MI, SystemZ::IILL, SystemZ::IIHL,
false);
942 case SystemZ::IIHMux:
943 expandRIPseudo(MI, SystemZ::IILH, SystemZ::IIHH,
false);
946 case SystemZ::NIFMux:
947 expandRIPseudo(MI, SystemZ::NILF, SystemZ::NIHF,
false);
950 case SystemZ::NILMux:
951 expandRIPseudo(MI, SystemZ::NILL, SystemZ::NIHL,
false);
954 case SystemZ::NIHMux:
955 expandRIPseudo(MI, SystemZ::NILH, SystemZ::NIHH,
false);
958 case SystemZ::OIFMux:
959 expandRIPseudo(MI, SystemZ::OILF, SystemZ::OIHF,
false);
962 case SystemZ::OILMux:
963 expandRIPseudo(MI, SystemZ::OILL, SystemZ::OIHL,
false);
966 case SystemZ::OIHMux:
967 expandRIPseudo(MI, SystemZ::OILH, SystemZ::OIHH,
false);
970 case SystemZ::XIFMux:
971 expandRIPseudo(MI, SystemZ::XILF, SystemZ::XIHF,
false);
974 case SystemZ::TMLMux:
975 expandRIPseudo(MI, SystemZ::TMLL, SystemZ::TMHL,
false);
978 case SystemZ::TMHMux:
979 expandRIPseudo(MI, SystemZ::TMLH, SystemZ::TMHH,
false);
982 case SystemZ::AHIMux:
983 expandRIPseudo(MI, SystemZ::AHI, SystemZ::AIH,
false);
986 case SystemZ::AHIMuxK:
987 expandRIEPseudo(MI, SystemZ::AHI, SystemZ::AHIK, SystemZ::AIH);
990 case SystemZ::AFIMux:
991 expandRIPseudo(MI, SystemZ::AFI, SystemZ::AIH,
false);
994 case SystemZ::CFIMux:
998 case SystemZ::CLFIMux:
999 expandRIPseudo(MI, SystemZ::CLFI, SystemZ::CLIH,
false);
1003 expandRXYPseudo(MI,
SystemZ::C, SystemZ::CHF);
1006 case SystemZ::CLMux:
1007 expandRXYPseudo(MI, SystemZ::CL, SystemZ::CLHF);
1010 case SystemZ::RISBMux: {
1011 bool DestIsHigh =
isHighReg(MI->getOperand(0).getReg());
1012 bool SrcIsHigh =
isHighReg(MI->getOperand(2).getReg());
1013 if (SrcIsHigh == DestIsHigh)
1014 MI->setDesc(
get(DestIsHigh ? SystemZ::RISBHH : SystemZ::RISBLL));
1016 MI->setDesc(
get(DestIsHigh ? SystemZ::RISBHL : SystemZ::RISBLH));
1017 MI->getOperand(5).setImm(MI->getOperand(5).getImm() ^ 32);
1023 splitAdjDynAlloc(MI);
1059 case SystemZ::BRCTG:
1078 case SystemZ::CLGIJ:
1079 case SystemZ::CLGRJ:
1089 unsigned &LoadOpcode,
1090 unsigned &StoreOpcode)
const {
1091 if (RC == &SystemZ::GR32BitRegClass || RC == &SystemZ::ADDR32BitRegClass) {
1092 LoadOpcode = SystemZ::L;
1094 }
else if (RC == &SystemZ::GRH32BitRegClass) {
1095 LoadOpcode = SystemZ::LFH;
1096 StoreOpcode = SystemZ::STFH;
1097 }
else if (RC == &SystemZ::GRX32BitRegClass) {
1098 LoadOpcode = SystemZ::LMux;
1099 StoreOpcode = SystemZ::STMux;
1100 }
else if (RC == &SystemZ::GR64BitRegClass ||
1101 RC == &SystemZ::ADDR64BitRegClass) {
1102 LoadOpcode = SystemZ::LG;
1103 StoreOpcode = SystemZ::STG;
1104 }
else if (RC == &SystemZ::GR128BitRegClass ||
1105 RC == &SystemZ::ADDR128BitRegClass) {
1106 LoadOpcode = SystemZ::L128;
1107 StoreOpcode = SystemZ::ST128;
1108 }
else if (RC == &SystemZ::FP32BitRegClass) {
1110 StoreOpcode = SystemZ::STE;
1111 }
else if (RC == &SystemZ::FP64BitRegClass) {
1113 StoreOpcode = SystemZ::STD;
1114 }
else if (RC == &SystemZ::FP128BitRegClass) {
1115 LoadOpcode = SystemZ::LX;
1116 StoreOpcode = SystemZ::STX;
1122 int64_t Offset)
const {
1125 if (isUInt<12>(Offset) && isUInt<12>(Offset2)) {
1127 int Disp12Opcode = SystemZ::getDisp12Opcode(Opcode);
1128 if (Disp12Opcode >= 0)
1129 return Disp12Opcode;
1135 if (isInt<20>(Offset) && isInt<20>(Offset2)) {
1137 int Disp20Opcode = SystemZ::getDisp20Opcode(Opcode);
1138 if (Disp20Opcode >= 0)
1139 return Disp20Opcode;
1152 case SystemZ::LG:
return SystemZ::LTG;
1153 case SystemZ::LGF:
return SystemZ::LTGF;
1154 case SystemZ::LR:
return SystemZ::LTR;
1155 case SystemZ::LGFR:
return SystemZ::LTGFR;
1156 case SystemZ::LGR:
return SystemZ::LTGR;
1157 case SystemZ::LER:
return SystemZ::LTEBR;
1159 case SystemZ::LXR:
return SystemZ::LTXBR;
1169 uint64_t Top = (Mask >> First) + 1;
1170 if ((Top & -Top) == Top) {
1179 unsigned &Start,
unsigned &End)
const {
1186 unsigned LSB, Length;
1188 Start = 63 - (LSB + Length - 1);
1196 assert(LSB > 0 &&
"Bottom bit must be set");
1197 assert(LSB + Length < BitSize &&
"Top bit must be set");
1198 Start = 63 - (LSB - 1);
1199 End = 63 - (LSB + Length);
1210 return SystemZ::CRJ;
1212 return SystemZ::CGRJ;
1218 return SystemZ::CLRJ;
1220 return SystemZ::CLGRJ;
1223 case SystemZ::CLGFI:
1232 unsigned Reg, uint64_t
Value)
const {
1236 Opcode = SystemZ::LGHI;
1238 Opcode = SystemZ::LLILL;
1240 Opcode = SystemZ::LLILH;
1243 assert(
isInt<32>(Value) &&
"Huge values not handled yet");
1244 Opcode = SystemZ::LGFI;
bool isInt< 32 >(int64_t x)
bool isUInt< 8 >(uint64_t x)
virtual void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const LLVM_OVERRIDE
virtual bool ReverseBranchCondition(SmallVectorImpl< MachineOperand > &Cond) const LLVM_OVERRIDE
void push_back(const T &Elt)
const MachineFunction * getParent() const
virtual bool isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCycles, unsigned ExtraPredCycles, const BranchProbability &Probability) const LLVM_OVERRIDE
const int64_t CallFrameSize
MachineBasicBlock * getMBB() const
virtual unsigned isLoadFromStackSlot(const MachineInstr *MI, int &FrameIndex) const LLVM_OVERRIDE
static bool isVirtualRegister(unsigned Reg)
static bool removeIPMBasedCompare(MachineInstr *Compare, unsigned SrcReg, const MachineRegisterInfo *MRI, const TargetRegisterInfo *TRI)
static int isSimpleMove(const MachineInstr *MI, int &FrameIndex, unsigned Flag)
bool use_nodbg_empty(unsigned RegNo) const
static void eraseIfDead(MachineInstr *MI, const MachineRegisterInfo *MRI)
enable_if_c< std::numeric_limits< T >::is_integer &&!std::numeric_limits< T >::is_signed, T >::type findFirstSet(T Val, ZeroBehavior ZB=ZB_Max)
Get the index of the first set bit starting from the least significant bit.
const MCInstrDesc & getDesc() const
const char * getSymbolName() const
bool analyzeCompare(const MachineInstr *MI, unsigned &SrcReg, unsigned &SrcReg2, int &Mask, int &Value) const LLVM_OVERRIDE
virtual bool PredicateInstruction(MachineInstr *MI, const SmallVectorImpl< MachineOperand > &Pred) const LLVM_OVERRIDE
const unsigned CCMASK_ICMP
static uint64_t allOnes(unsigned int Count)
unsigned getLoadAndTest(unsigned Opcode) const
bool hasLoadStoreOnCond() const
virtual void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, DebugLoc DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const LLVM_OVERRIDE
virtual MachineInstr * convertToThreeAddress(MachineFunction::iterator &MFI, MachineBasicBlock::iterator &MBBI, LiveVariables *LV) const
const MCAsmInfo * getMCAsmInfo() const
bool isImm() const
isImm - Tests if this is a MO_Immediate operand.
#define llvm_unreachable(msg)
void loadImmediate(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned Reg, uint64_t Value) const
bool isReg() const
isReg - Tests if this is a MO_Register operand.
bool isInt< 8 >(int64_t x)
const TargetRegisterClass * getRegClass(unsigned Reg) const
void replaceKillInstruction(unsigned Reg, MachineInstr *OldMI, MachineInstr *NewMI)
Abstract Stack Frame Information.
virtual bool expandPostRAPseudo(MachineBasicBlock::iterator MBBI) const LLVM_OVERRIDE
static bool isShift(MachineInstr *MI, int Opcode, int64_t Imm)
const MachineInstrBuilder & addImm(int64_t Val) const
unsigned getNumOperands() const
uint64_t getInstSizeInBytes(const MachineInstr *MI) const
void getLoadStoreOpcodes(const TargetRegisterClass *RC, unsigned &LoadOpcode, unsigned &StoreOpcode) const
static LogicOp interpretAndImmediate(unsigned Opcode)
bool isFI() const
isFI - Tests if this is a MO_FrameIndex operand.
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const
virtual unsigned RemoveBranch(MachineBasicBlock &MBB) const LLVM_OVERRIDE
const MachineOperand * Target
const unsigned CCMASK_ANY
SystemZII::Branch getBranchInfo(const MachineInstr *MI) const
const TargetRegisterClass * constrainRegClass(unsigned Reg, const TargetRegisterClass *RC, unsigned MinNumRegs=0)
unsigned getKillRegState(bool B)
const MachineBasicBlock * getParent() const
virtual MachineInstr * foldMemoryOperandImpl(MachineFunction &MF, MachineInstr *MI, const SmallVectorImpl< unsigned > &Ops, int FrameIndex) const
bundle_iterator< MachineInstr, instr_iterator > iterator
Control flow instructions. These all have token chains.
unsigned getOpcodeForOffset(unsigned Opcode, int64_t Offset) const
static unsigned getAccessSize(unsigned int Flags)
virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const SmallVectorImpl< MachineOperand > &Cond, DebugLoc DL) const LLVM_OVERRIDE
const MachineOperand & getOperand(unsigned i) const
unsigned getSize() const
Return the number of bytes in the encoding of this instruction, or zero if the encoding size cannot b...
unsigned getNumExplicitOperands() const
ItTy next(ItTy it, Dist n)
void setImm(int64_t immVal)
bool hasOneMemOperand() const
MachineInstrBuilder BuildMI(MachineFunction &MF, DebugLoc DL, const MCInstrDesc &MCID)
bool isRxSBGMask(uint64_t Mask, unsigned BitSize, unsigned &Start, unsigned &End) const
unsigned getSubReg() const
static bool isImmLH(uint64_t Val)
static const MachineInstrBuilder & addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset=0, bool mem=true)
static bool isHighReg(unsigned int Reg)
virtual const SystemZRegisterInfo * getRegisterInfo() const LLVM_OVERRIDE
unsigned getCompareAndBranch(unsigned Opcode, const MachineInstr *MI=0) const
void setDesc(const MCInstrDesc &tid)
MachineInstr * CloneMachineInstr(const MachineInstr *Orig)
virtual const SystemZSubtarget * getSubtargetImpl() const LLVM_OVERRIDE
static bool isStringOfOnes(uint64_t Mask, unsigned &LSB, unsigned &Length)
unsigned getMaxCallFrameSize() const
virtual void loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, int FrameIdx, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const LLVM_OVERRIDE
bool isMBB() const
isMBB - Tests if this is a MO_MachineBasicBlock operand.
const unsigned CCMASK_CMP_NE
MachineFrameInfo * getFrameInfo()
const MachineInstrBuilder & addFrameIndex(int Idx) const
virtual bool isStackSlotCopy(const MachineInstr *MI, int &DestFrameIndex, int &SrcFrameIndex) const LLVM_OVERRIDE
bool isCompare(QueryType Type=IgnoreBundle) const
isCompare - Return true if this instruction is a comparison.
virtual bool isPredicable(MachineInstr *MI) const LLVM_OVERRIDE
virtual unsigned isStoreToStackSlot(const MachineInstr *MI, int &FrameIndex) const LLVM_OVERRIDE
static MachineInstr * finishConvertToThreeAddress(MachineInstr *OldMI, MachineInstr *NewMI, LiveVariables *LV)
MachineInstr * getUniqueVRegDef(unsigned Reg) const
APInt And(const APInt &LHS, const APInt &RHS)
Bitwise AND function for APInt.
static bool isPhysicalRegister(unsigned Reg)
static MachineInstr * getDef(unsigned Reg, const MachineRegisterInfo *MRI)
MachineRegisterInfo & getRegInfo()
void setReg(unsigned Reg)
const MachineInstrBuilder & addMemOperand(MachineMemOperand *MMO) const
static MachineOperand CreateImm(int64_t Val)
bool optimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg, unsigned SrcReg2, int Mask, int Value, const MachineRegisterInfo *MRI) const LLVM_OVERRIDE
static bool isSimpleBD12Move(const MachineInstr *MI, unsigned Flag)
const TargetMachine & getTarget() const
static unsigned getConditionalMove(unsigned Opcode)
instr_iterator insert(instr_iterator I, MachineInstr *M)
bool isInt< 16 >(int64_t x)
virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const LLVM_OVERRIDE
unsigned getReg() const
getReg - Returns the register number.
bool hasDistinctOps() const
LLVM Value Representation.
const MachineInstrBuilder & addMBB(MachineBasicBlock *MBB, unsigned char TargetFlags=0) const
SystemZInstrInfo(SystemZTargetMachine &TM)
const MachineInstrBuilder & addOperand(const MachineOperand &MO) const
BasicBlockListType::iterator iterator
uint64_t getSize() const
getSize - Return the size in bytes of the memory reference.
static bool isImmLL(uint64_t Val)
const MCRegisterInfo & MRI
bool isLayoutSuccessor(const MachineBasicBlock *MBB) const
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
int64_t getObjectSize(int ObjectIdx) const
bool modifiesRegister(unsigned Reg, const TargetRegisterInfo *TRI) const
DebugLoc getDebugLoc() const
mmo_iterator memoperands_begin() const
Access to memory operands of the instruction.
bool contains(unsigned Reg) const