Lines Matching full:arm
1 //===-- ARMBaseInstrInfo.cpp - ARM Instruction Information ----------------===//
9 // This file contains the Base ARM implementation of the TargetInstrInfo class.
75 #define DEBUG_TYPE "arm-instrinfo"
81 EnableARM3Addr("enable-arm-3-addr-conv", cl::Hidden,
82 cl::desc("Enable ARM 2-addr to 3-addr conv"));
96 { ARM::VMLAS, ARM::VMULS, ARM::VADDS, false, false },
97 { ARM::VMLSS, ARM::VMULS, ARM::VSUBS, false, false },
98 { ARM::VMLAD, ARM::VMULD, ARM::VADDD, false, false },
99 { ARM::VMLSD, ARM::VMULD, ARM::VSUBD, false, false },
100 { ARM::VNMLAS, ARM::VNMULS, ARM::VSUBS, true, false },
101 { ARM::VNMLSS, ARM::VMULS, ARM::VSUBS, true, false },
102 { ARM::VNMLAD, ARM::VNMULD, ARM::VSUBD, true, false },
103 { ARM::VNMLSD, ARM::VMULD, ARM::VSUBD, true, false },
106 { ARM::VMLAfd, ARM::VMULfd, ARM::VADDfd, false, false },
107 { ARM::VMLSfd, ARM::VMULfd, ARM::VSUBfd, false, false },
108 { ARM::VMLAfq, ARM::VMULfq, ARM::VADDfq, false, false },
109 { ARM::VMLSfq, ARM::VMULfq, ARM::VSUBfq, false, false },
110 { ARM::VMLAslfd, ARM::VMULslfd, ARM::VADDfd, false, true },
111 { ARM::VMLSslfd, ARM::VMULslfd, ARM::VSUBfd, false, true },
112 { ARM::VMLAslfq, ARM::VMULslfq, ARM::VADDfq, false, true },
113 { ARM::VMLSslfq, ARM::VMULslfq, ARM::VSUBfq, false, true },
117 : ARMGenInstrInfo(ARM::ADJCALLSTACKDOWN, ARM::ADJCALLSTACKUP), in ARMBaseInstrInfo()
127 // Use a ScoreboardHazardRecognizer for prepass ARM scheduling. TargetInstrImpl
230 get(isSub ? ARM::SUBri : ARM::ADDri), WBReg) in convertToThreeAddress()
239 get(isSub ? ARM::SUBrsi : ARM::ADDrsi), WBReg) in convertToThreeAddress()
248 get(isSub ? ARM::SUBrr : ARM::ADDrr), WBReg) in convertToThreeAddress()
261 get(isSub ? ARM::SUBri : ARM::ADDri), WBReg) in convertToThreeAddress()
268 get(isSub ? ARM::SUBrr : ARM::ADDrr), WBReg) in convertToThreeAddress()
381 I->getOpcode() == ARM::t2DoLoopStartTP){ in analyzeBranch()
407 } else if (I->getOpcode() == ARM::t2LoopEnd && in analyzeBranch()
481 !isCondBranchOpcode(I->getOpcode()) && I->getOpcode() != ARM::t2LoopEnd) in removeBranch()
491 if (!isCondBranchOpcode(I->getOpcode()) && I->getOpcode() != ARM::t2LoopEnd) in removeBranch()
508 ? ARM::B : (AFI->isThumb2Function() ? ARM::t2B : ARM::tB); in insertBranch()
510 ? ARM::Bcc : (AFI->isThumb2Function() ? ARM::t2Bcc : ARM::tBcc); in insertBranch()
516 "ARM branch conditions have two or three components!"); in insertBranch()
626 MI.getOperand(1).getReg() != ARM::CPSR) && in PredicateInstruction()
628 MI.getOperand(1).setReg(ARM::NoRegister); in PredicateInstruction()
667 bool ClobbersCPSR = MO.isRegMask() && MO.clobbersPhysReg(ARM::CPSR); in ClobbersPredicate()
668 bool IsCPSR = MO.isReg() && MO.isDef() && MO.getReg() == ARM::CPSR; in ClobbersPredicate()
688 if (MO.isReg() && MO.getReg() == ARM::CPSR && MO.isDef() && !MO.isDead()) in isCPSRDefined()
696 case ARM::tADC: // ADC (register) T1 in isEligibleForITBlock()
697 case ARM::tADDi3: // ADD (immediate) T1 in isEligibleForITBlock()
698 case ARM::tADDi8: // ADD (immediate) T2 in isEligibleForITBlock()
699 case ARM::tADDrr: // ADD (register) T1 in isEligibleForITBlock()
700 case ARM::tAND: // AND (register) T1 in isEligibleForITBlock()
701 case ARM::tASRri: // ASR (immediate) T1 in isEligibleForITBlock()
702 case ARM::tASRrr: // ASR (register) T1 in isEligibleForITBlock()
703 case ARM::tBIC: // BIC (register) T1 in isEligibleForITBlock()
704 case ARM::tEOR: // EOR (register) T1 in isEligibleForITBlock()
705 case ARM::tLSLri: // LSL (immediate) T1 in isEligibleForITBlock()
706 case ARM::tLSLrr: // LSL (register) T1 in isEligibleForITBlock()
707 case ARM::tLSRri: // LSR (immediate) T1 in isEligibleForITBlock()
708 case ARM::tLSRrr: // LSR (register) T1 in isEligibleForITBlock()
709 case ARM::tMUL: // MUL T1 in isEligibleForITBlock()
710 case ARM::tMVN: // MVN (register) T1 in isEligibleForITBlock()
711 case ARM::tORR: // ORR (register) T1 in isEligibleForITBlock()
712 case ARM::tROR: // ROR (register) T1 in isEligibleForITBlock()
713 case ARM::tRSB: // RSB (immediate) T1 in isEligibleForITBlock()
714 case ARM::tSBC: // SBC (register) T1 in isEligibleForITBlock()
715 case ARM::tSUBi3: // SUB (immediate) T1 in isEligibleForITBlock()
716 case ARM::tSUBi8: // SUB (immediate) T2 in isEligibleForITBlock()
717 case ARM::tSUBrr: // SUB (register) T1 in isEligibleForITBlock()
740 // In their ARM encoding, they can't be encoded in a conditional form. in isPredicable()
766 if (MO.getReg() != ARM::CPSR) in IsCPSRDead()
790 // instructions are 2-4 bytes, and ARM instructions are 4 bytes), in in getInstSizeInBytes()
796 case ARM::CONSTPOOL_ENTRY: in getInstSizeInBytes()
797 case ARM::JUMPTABLE_INSTS: in getInstSizeInBytes()
798 case ARM::JUMPTABLE_ADDRS: in getInstSizeInBytes()
799 case ARM::JUMPTABLE_TBB: in getInstSizeInBytes()
800 case ARM::JUMPTABLE_TBH: in getInstSizeInBytes()
804 case ARM::SPACE: in getInstSizeInBytes()
806 case ARM::INLINEASM: in getInstSizeInBytes()
807 case ARM::INLINEASM_BR: { in getInstSizeInBytes()
833 ? (Subtarget.isMClass() ? ARM::t2MRS_M : ARM::t2MRS_AR) in copyFromCPSR()
834 : ARM::MRS; in copyFromCPSR()
845 .addReg(ARM::CPSR, RegState::Implicit | getKillRegState(KillSrc)); in copyFromCPSR()
853 ? (Subtarget.isMClass() ? ARM::t2MSR_M : ARM::t2MSR_AR) in copyToCPSR()
854 : ARM::MSR; in copyToCPSR()
865 .addReg(ARM::CPSR, RegState::Implicit | RegState::Define); in copyToCPSR()
882 MIB.addReg(ARM::VPR, RegState::Implicit); in addPredicatedMveVpredNOp()
896 bool GPRDest = ARM::GPRRegClass.contains(DestReg); in copyPhysReg()
897 bool GPRSrc = ARM::GPRRegClass.contains(SrcReg); in copyPhysReg()
900 BuildMI(MBB, I, DL, get(ARM::MOVr), DestReg) in copyPhysReg()
907 bool SPRDest = ARM::SPRRegClass.contains(DestReg); in copyPhysReg()
908 bool SPRSrc = ARM::SPRRegClass.contains(SrcReg); in copyPhysReg()
912 Opc = ARM::VMOVS; in copyPhysReg()
914 Opc = ARM::VMOVRS; in copyPhysReg()
916 Opc = ARM::VMOVSR; in copyPhysReg()
917 else if (ARM::DPRRegClass.contains(DestReg, SrcReg) && Subtarget.hasFP64()) in copyPhysReg()
918 Opc = ARM::VMOVD; in copyPhysReg()
919 else if (ARM::QPRRegClass.contains(DestReg, SrcReg)) in copyPhysReg()
920 Opc = Subtarget.hasNEON() ? ARM::VORRq : ARM::MQPRCopy; in copyPhysReg()
925 if (Opc == ARM::VORRq || Opc == ARM::MVE_VORR) in copyPhysReg()
927 if (Opc == ARM::MVE_VORR) in copyPhysReg()
929 else if (Opc != ARM::MQPRCopy) in copyPhysReg()
940 if (ARM::QQPRRegClass.contains(DestReg, SrcReg)) { in copyPhysReg()
941 Opc = Subtarget.hasNEON() ? ARM::VORRq : ARM::MVE_VORR; in copyPhysReg()
942 BeginIdx = ARM::qsub_0; in copyPhysReg()
944 } else if (ARM::QQQQPRRegClass.contains(DestReg, SrcReg)) { in copyPhysReg()
945 Opc = Subtarget.hasNEON() ? ARM::VORRq : ARM::MVE_VORR; in copyPhysReg()
946 BeginIdx = ARM::qsub_0; in copyPhysReg()
949 } else if (ARM::DPairRegClass.contains(DestReg, SrcReg)) { in copyPhysReg()
950 Opc = ARM::VMOVD; in copyPhysReg()
951 BeginIdx = ARM::dsub_0; in copyPhysReg()
953 } else if (ARM::DTripleRegClass.contains(DestReg, SrcReg)) { in copyPhysReg()
954 Opc = ARM::VMOVD; in copyPhysReg()
955 BeginIdx = ARM::dsub_0; in copyPhysReg()
957 } else if (ARM::DQuadRegClass.contains(DestReg, SrcReg)) { in copyPhysReg()
958 Opc = ARM::VMOVD; in copyPhysReg()
959 BeginIdx = ARM::dsub_0; in copyPhysReg()
961 } else if (ARM::GPRPairRegClass.contains(DestReg, SrcReg)) { in copyPhysReg()
962 Opc = Subtarget.isThumb2() ? ARM::tMOVr : ARM::MOVr; in copyPhysReg()
963 BeginIdx = ARM::gsub_0; in copyPhysReg()
965 } else if (ARM::DPairSpcRegClass.contains(DestReg, SrcReg)) { in copyPhysReg()
966 Opc = ARM::VMOVD; in copyPhysReg()
967 BeginIdx = ARM::dsub_0; in copyPhysReg()
970 } else if (ARM::DTripleSpcRegClass.contains(DestReg, SrcReg)) { in copyPhysReg()
971 Opc = ARM::VMOVD; in copyPhysReg()
972 BeginIdx = ARM::dsub_0; in copyPhysReg()
975 } else if (ARM::DQuadSpcRegClass.contains(DestReg, SrcReg)) { in copyPhysReg()
976 Opc = ARM::VMOVD; in copyPhysReg()
977 BeginIdx = ARM::dsub_0; in copyPhysReg()
980 } else if (ARM::DPRRegClass.contains(DestReg, SrcReg) && in copyPhysReg()
982 Opc = ARM::VMOVS; in copyPhysReg()
983 BeginIdx = ARM::ssub_0; in copyPhysReg()
985 } else if (SrcReg == ARM::CPSR) { in copyPhysReg()
988 } else if (DestReg == ARM::CPSR) { in copyPhysReg()
991 } else if (DestReg == ARM::VPR) { in copyPhysReg()
992 assert(ARM::GPRRegClass.contains(SrcReg)); in copyPhysReg()
993 BuildMI(MBB, I, I->getDebugLoc(), get(ARM::VMSR_P0), DestReg) in copyPhysReg()
997 } else if (SrcReg == ARM::VPR) { in copyPhysReg()
998 assert(ARM::GPRRegClass.contains(DestReg)); in copyPhysReg()
999 BuildMI(MBB, I, I->getDebugLoc(), get(ARM::VMRS_P0), DestReg) in copyPhysReg()
1003 } else if (DestReg == ARM::FPSCR_NZCV) { in copyPhysReg()
1004 assert(ARM::GPRRegClass.contains(SrcReg)); in copyPhysReg()
1005 BuildMI(MBB, I, I->getDebugLoc(), get(ARM::VMSR_FPSCR_NZCVQC), DestReg) in copyPhysReg()
1009 } else if (SrcReg == ARM::FPSCR_NZCV) { in copyPhysReg()
1010 assert(ARM::GPRRegClass.contains(DestReg)); in copyPhysReg()
1011 BuildMI(MBB, I, I->getDebugLoc(), get(ARM::VMRS_FPSCR_NZCVQC), DestReg) in copyPhysReg()
1040 if (Opc == ARM::VORRq || Opc == ARM::MVE_VORR) { in copyPhysReg()
1044 if (Opc == ARM::MVE_VORR) in copyPhysReg()
1049 if (Opc == ARM::MOVr) in copyPhysReg()
1068 (MI.getOpcode() == ARM::VORRq && in isCopyInstrImpl()
1132 if (ARM::HPRRegClass.hasSubClassEq(RC)) { in storeRegToStackSlot()
1133 BuildMI(MBB, I, DebugLoc(), get(ARM::VSTRH)) in storeRegToStackSlot()
1143 if (ARM::GPRRegClass.hasSubClassEq(RC)) { in storeRegToStackSlot()
1144 BuildMI(MBB, I, DebugLoc(), get(ARM::STRi12)) in storeRegToStackSlot()
1150 } else if (ARM::SPRRegClass.hasSubClassEq(RC)) { in storeRegToStackSlot()
1151 BuildMI(MBB, I, DebugLoc(), get(ARM::VSTRS)) in storeRegToStackSlot()
1157 } else if (ARM::VCCRRegClass.hasSubClassEq(RC)) { in storeRegToStackSlot()
1158 BuildMI(MBB, I, DebugLoc(), get(ARM::VSTR_P0_off)) in storeRegToStackSlot()
1168 if (ARM::DPRRegClass.hasSubClassEq(RC)) { in storeRegToStackSlot()
1169 BuildMI(MBB, I, DebugLoc(), get(ARM::VSTRD)) in storeRegToStackSlot()
1175 } else if (ARM::GPRPairRegClass.hasSubClassEq(RC)) { in storeRegToStackSlot()
1177 MachineInstrBuilder MIB = BuildMI(MBB, I, DebugLoc(), get(ARM::STRD)); in storeRegToStackSlot()
1178 AddDReg(MIB, SrcReg, ARM::gsub_0, getKillRegState(isKill), TRI); in storeRegToStackSlot()
1179 AddDReg(MIB, SrcReg, ARM::gsub_1, 0, TRI); in storeRegToStackSlot()
1185 MachineInstrBuilder MIB = BuildMI(MBB, I, DebugLoc(), get(ARM::STMIA)) in storeRegToStackSlot()
1189 AddDReg(MIB, SrcReg, ARM::gsub_0, getKillRegState(isKill), TRI); in storeRegToStackSlot()
1190 AddDReg(MIB, SrcReg, ARM::gsub_1, 0, TRI); in storeRegToStackSlot()
1196 if (ARM::DPairRegClass.hasSubClassEq(RC) && Subtarget.hasNEON()) { in storeRegToStackSlot()
1199 BuildMI(MBB, I, DebugLoc(), get(ARM::VST1q64)) in storeRegToStackSlot()
1206 BuildMI(MBB, I, DebugLoc(), get(ARM::VSTMQIA)) in storeRegToStackSlot()
1212 } else if (ARM::QPRRegClass.hasSubClassEq(RC) && in storeRegToStackSlot()
1214 auto MIB = BuildMI(MBB, I, DebugLoc(), get(ARM::MVE_VSTRWU32)); in storeRegToStackSlot()
1224 if (ARM::DTripleRegClass.hasSubClassEq(RC)) { in storeRegToStackSlot()
1228 BuildMI(MBB, I, DebugLoc(), get(ARM::VST1d64TPseudo)) in storeRegToStackSlot()
1236 get(ARM::VSTMDIA)) in storeRegToStackSlot()
1240 MIB = AddDReg(MIB, SrcReg, ARM::dsub_0, getKillRegState(isKill), TRI); in storeRegToStackSlot()
1241 MIB = AddDReg(MIB, SrcReg, ARM::dsub_1, 0, TRI); in storeRegToStackSlot()
1242 AddDReg(MIB, SrcReg, ARM::dsub_2, 0, TRI); in storeRegToStackSlot()
1248 if (ARM::QQPRRegClass.hasSubClassEq(RC) || in storeRegToStackSlot()
1249 ARM::MQQPRRegClass.hasSubClassEq(RC) || in storeRegToStackSlot()
1250 ARM::DQuadRegClass.hasSubClassEq(RC)) { in storeRegToStackSlot()
1255 BuildMI(MBB, I, DebugLoc(), get(ARM::VST1d64QPseudo)) in storeRegToStackSlot()
1262 BuildMI(MBB, I, DebugLoc(), get(ARM::MQQPRStore)) in storeRegToStackSlot()
1268 get(ARM::VSTMDIA)) in storeRegToStackSlot()
1272 MIB = AddDReg(MIB, SrcReg, ARM::dsub_0, getKillRegState(isKill), TRI); in storeRegToStackSlot()
1273 MIB = AddDReg(MIB, SrcReg, ARM::dsub_1, 0, TRI); in storeRegToStackSlot()
1274 MIB = AddDReg(MIB, SrcReg, ARM::dsub_2, 0, TRI); in storeRegToStackSlot()
1275 AddDReg(MIB, SrcReg, ARM::dsub_3, 0, TRI); in storeRegToStackSlot()
1281 if (ARM::MQQQQPRRegClass.hasSubClassEq(RC) && in storeRegToStackSlot()
1283 BuildMI(MBB, I, DebugLoc(), get(ARM::MQQQQPRStore)) in storeRegToStackSlot()
1287 } else if (ARM::QQQQPRRegClass.hasSubClassEq(RC)) { in storeRegToStackSlot()
1288 MachineInstrBuilder MIB = BuildMI(MBB, I, DebugLoc(), get(ARM::VSTMDIA)) in storeRegToStackSlot()
1292 MIB = AddDReg(MIB, SrcReg, ARM::dsub_0, getKillRegState(isKill), TRI); in storeRegToStackSlot()
1293 MIB = AddDReg(MIB, SrcReg, ARM::dsub_1, 0, TRI); in storeRegToStackSlot()
1294 MIB = AddDReg(MIB, SrcReg, ARM::dsub_2, 0, TRI); in storeRegToStackSlot()
1295 MIB = AddDReg(MIB, SrcReg, ARM::dsub_3, 0, TRI); in storeRegToStackSlot()
1296 MIB = AddDReg(MIB, SrcReg, ARM::dsub_4, 0, TRI); in storeRegToStackSlot()
1297 MIB = AddDReg(MIB, SrcReg, ARM::dsub_5, 0, TRI); in storeRegToStackSlot()
1298 MIB = AddDReg(MIB, SrcReg, ARM::dsub_6, 0, TRI); in storeRegToStackSlot()
1299 AddDReg(MIB, SrcReg, ARM::dsub_7, 0, TRI); in storeRegToStackSlot()
1312 case ARM::STRrs: in isStoreToStackSlot()
1313 case ARM::t2STRs: // FIXME: don't use t2STRs to access frame. in isStoreToStackSlot()
1321 case ARM::STRi12: in isStoreToStackSlot()
1322 case ARM::t2STRi12: in isStoreToStackSlot()
1323 case ARM::tSTRspi: in isStoreToStackSlot()
1324 case ARM::VSTRD: in isStoreToStackSlot()
1325 case ARM::VSTRS: in isStoreToStackSlot()
1326 case ARM::VSTR_P0_off: in isStoreToStackSlot()
1327 case ARM::MVE_VSTRWU32: in isStoreToStackSlot()
1334 case ARM::VST1q64: in isStoreToStackSlot()
1335 case ARM::VST1d64TPseudo: in isStoreToStackSlot()
1336 case ARM::VST1d64QPseudo: in isStoreToStackSlot()
1342 case ARM::VSTMQIA: in isStoreToStackSlot()
1348 case ARM::MQQPRStore: in isStoreToStackSlot()
1349 case ARM::MQQQQPRStore: in isStoreToStackSlot()
1390 if (ARM::HPRRegClass.hasSubClassEq(RC)) { in loadRegFromStackSlot()
1391 BuildMI(MBB, I, DL, get(ARM::VLDRH), DestReg) in loadRegFromStackSlot()
1400 if (ARM::GPRRegClass.hasSubClassEq(RC)) { in loadRegFromStackSlot()
1401 BuildMI(MBB, I, DL, get(ARM::LDRi12), DestReg) in loadRegFromStackSlot()
1406 } else if (ARM::SPRRegClass.hasSubClassEq(RC)) { in loadRegFromStackSlot()
1407 BuildMI(MBB, I, DL, get(ARM::VLDRS), DestReg) in loadRegFromStackSlot()
1412 } else if (ARM::VCCRRegClass.hasSubClassEq(RC)) { in loadRegFromStackSlot()
1413 BuildMI(MBB, I, DL, get(ARM::VLDR_P0_off), DestReg) in loadRegFromStackSlot()
1422 if (ARM::DPRRegClass.hasSubClassEq(RC)) { in loadRegFromStackSlot()
1423 BuildMI(MBB, I, DL, get(ARM::VLDRD), DestReg) in loadRegFromStackSlot()
1428 } else if (ARM::GPRPairRegClass.hasSubClassEq(RC)) { in loadRegFromStackSlot()
1432 MIB = BuildMI(MBB, I, DL, get(ARM::LDRD)); in loadRegFromStackSlot()
1433 AddDReg(MIB, DestReg, ARM::gsub_0, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1434 AddDReg(MIB, DestReg, ARM::gsub_1, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1440 MIB = BuildMI(MBB, I, DL, get(ARM::LDMIA)) in loadRegFromStackSlot()
1444 MIB = AddDReg(MIB, DestReg, ARM::gsub_0, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1445 MIB = AddDReg(MIB, DestReg, ARM::gsub_1, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1454 if (ARM::DPairRegClass.hasSubClassEq(RC) && Subtarget.hasNEON()) { in loadRegFromStackSlot()
1456 BuildMI(MBB, I, DL, get(ARM::VLD1q64), DestReg) in loadRegFromStackSlot()
1462 BuildMI(MBB, I, DL, get(ARM::VLDMQIA), DestReg) in loadRegFromStackSlot()
1467 } else if (ARM::QPRRegClass.hasSubClassEq(RC) && in loadRegFromStackSlot()
1469 auto MIB = BuildMI(MBB, I, DL, get(ARM::MVE_VLDRWU32), DestReg); in loadRegFromStackSlot()
1478 if (ARM::DTripleRegClass.hasSubClassEq(RC)) { in loadRegFromStackSlot()
1481 BuildMI(MBB, I, DL, get(ARM::VLD1d64TPseudo), DestReg) in loadRegFromStackSlot()
1487 MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(ARM::VLDMDIA)) in loadRegFromStackSlot()
1491 MIB = AddDReg(MIB, DestReg, ARM::dsub_0, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1492 MIB = AddDReg(MIB, DestReg, ARM::dsub_1, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1493 MIB = AddDReg(MIB, DestReg, ARM::dsub_2, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1501 if (ARM::QQPRRegClass.hasSubClassEq(RC) || in loadRegFromStackSlot()
1502 ARM::MQQPRRegClass.hasSubClassEq(RC) || in loadRegFromStackSlot()
1503 ARM::DQuadRegClass.hasSubClassEq(RC)) { in loadRegFromStackSlot()
1506 BuildMI(MBB, I, DL, get(ARM::VLD1d64QPseudo), DestReg) in loadRegFromStackSlot()
1512 BuildMI(MBB, I, DL, get(ARM::MQQPRLoad), DestReg) in loadRegFromStackSlot()
1516 MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(ARM::VLDMDIA)) in loadRegFromStackSlot()
1520 MIB = AddDReg(MIB, DestReg, ARM::dsub_0, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1521 MIB = AddDReg(MIB, DestReg, ARM::dsub_1, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1522 MIB = AddDReg(MIB, DestReg, ARM::dsub_2, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1523 MIB = AddDReg(MIB, DestReg, ARM::dsub_3, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1531 if (ARM::MQQQQPRRegClass.hasSubClassEq(RC) && in loadRegFromStackSlot()
1533 BuildMI(MBB, I, DL, get(ARM::MQQQQPRLoad), DestReg) in loadRegFromStackSlot()
1536 } else if (ARM::QQQQPRRegClass.hasSubClassEq(RC)) { in loadRegFromStackSlot()
1537 MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(ARM::VLDMDIA)) in loadRegFromStackSlot()
1541 MIB = AddDReg(MIB, DestReg, ARM::dsub_0, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1542 MIB = AddDReg(MIB, DestReg, ARM::dsub_1, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1543 MIB = AddDReg(MIB, DestReg, ARM::dsub_2, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1544 MIB = AddDReg(MIB, DestReg, ARM::dsub_3, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1545 MIB = AddDReg(MIB, DestReg, ARM::dsub_4, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1546 MIB = AddDReg(MIB, DestReg, ARM::dsub_5, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1547 MIB = AddDReg(MIB, DestReg, ARM::dsub_6, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1548 MIB = AddDReg(MIB, DestReg, ARM::dsub_7, RegState::DefineNoRead, TRI); in loadRegFromStackSlot()
1563 case ARM::LDRrs: in isLoadFromStackSlot()
1564 case ARM::t2LDRs: // FIXME: don't use t2LDRs to access frame. in isLoadFromStackSlot()
1572 case ARM::LDRi12: in isLoadFromStackSlot()
1573 case ARM::t2LDRi12: in isLoadFromStackSlot()
1574 case ARM::tLDRspi: in isLoadFromStackSlot()
1575 case ARM::VLDRD: in isLoadFromStackSlot()
1576 case ARM::VLDRS: in isLoadFromStackSlot()
1577 case ARM::VLDR_P0_off: in isLoadFromStackSlot()
1578 case ARM::MVE_VLDRWU32: in isLoadFromStackSlot()
1585 case ARM::VLD1q64: in isLoadFromStackSlot()
1586 case ARM::VLD1d8TPseudo: in isLoadFromStackSlot()
1587 case ARM::VLD1d16TPseudo: in isLoadFromStackSlot()
1588 case ARM::VLD1d32TPseudo: in isLoadFromStackSlot()
1589 case ARM::VLD1d64TPseudo: in isLoadFromStackSlot()
1590 case ARM::VLD1d8QPseudo: in isLoadFromStackSlot()
1591 case ARM::VLD1d16QPseudo: in isLoadFromStackSlot()
1592 case ARM::VLD1d32QPseudo: in isLoadFromStackSlot()
1593 case ARM::VLD1d64QPseudo: in isLoadFromStackSlot()
1599 case ARM::VLDMQIA: in isLoadFromStackSlot()
1605 case ARM::MQQPRLoad: in isLoadFromStackSlot()
1606 case ARM::MQQQQPRLoad: in isLoadFromStackSlot()
1643 LDM = BuildMI(*BB, MI, dl, TII->get(isThumb2 ? ARM::t2LDMIA_UPD in expandMEMCPY()
1644 : isThumb1 ? ARM::tLDMIA_UPD in expandMEMCPY()
1645 : ARM::LDMIA_UPD)) in expandMEMCPY()
1648 LDM = BuildMI(*BB, MI, dl, TII->get(isThumb2 ? ARM::t2LDMIA : ARM::LDMIA)); in expandMEMCPY()
1653 STM = BuildMI(*BB, MI, dl, TII->get(isThumb2 ? ARM::t2STMIA_UPD in expandMEMCPY()
1654 : isThumb1 ? ARM::tSTMIA_UPD in expandMEMCPY()
1655 : ARM::STMIA_UPD)) in expandMEMCPY()
1658 STM = BuildMI(*BB, MI, dl, TII->get(isThumb2 ? ARM::t2STMIA : ARM::STMIA)); in expandMEMCPY()
1693 if (MI.getOpcode() == ARM::MEMCPY) { in expandPostRAPseudo()
1709 if (!ARM::SPRRegClass.contains(DstRegS, SrcRegS)) in expandPostRAPseudo()
1713 unsigned DstRegD = TRI->getMatchingSuperReg(DstRegS, ARM::ssub_0, in expandPostRAPseudo()
1714 &ARM::DPRRegClass); in expandPostRAPseudo()
1715 unsigned SrcRegD = TRI->getMatchingSuperReg(SrcRegS, ARM::ssub_0, in expandPostRAPseudo()
1716 &ARM::DPRRegClass); in expandPostRAPseudo()
1741 MI.setDesc(get(ARM::VMOVD)); in expandPostRAPseudo()
1780 // is Thumb mode (t1 or t2). PCAdjustment would be 8 for ARM mode PIC, and in duplicateCPV()
1781 // zero for non-PIC in ARM or Thumb. The callers are all of thumb LDR in duplicateCPV()
1804 llvm_unreachable("Unexpected ARM constantpool value type!!"); in duplicateCPV()
1822 case ARM::tLDRpci_pic: in reMaterialize()
1823 case ARM::t2LDRpci_pic: { in reMaterialize()
1844 case ARM::tLDRpci_pic: in duplicate()
1845 case ARM::t2LDRpci_pic: { in duplicate()
1865 if (Opcode == ARM::t2LDRpci || Opcode == ARM::t2LDRpci_pic || in produceSameValue()
1866 Opcode == ARM::tLDRpci || Opcode == ARM::tLDRpci_pic || in produceSameValue()
1867 Opcode == ARM::LDRLIT_ga_pcrel || Opcode == ARM::LDRLIT_ga_pcrel_ldr || in produceSameValue()
1868 Opcode == ARM::tLDRLIT_ga_pcrel || Opcode == ARM::t2LDRLIT_ga_pcrel || in produceSameValue()
1869 Opcode == ARM::MOV_ga_pcrel || Opcode == ARM::MOV_ga_pcrel_ldr || in produceSameValue()
1870 Opcode == ARM::t2MOV_ga_pcrel) { in produceSameValue()
1881 if (Opcode == ARM::LDRLIT_ga_pcrel || Opcode == ARM::LDRLIT_ga_pcrel_ldr || in produceSameValue()
1882 Opcode == ARM::tLDRLIT_ga_pcrel || Opcode == ARM::t2LDRLIT_ga_pcrel || in produceSameValue()
1883 Opcode == ARM::MOV_ga_pcrel || Opcode == ARM::MOV_ga_pcrel_ldr || in produceSameValue()
1884 Opcode == ARM::t2MOV_ga_pcrel) in produceSameValue()
1906 } else if (Opcode == ARM::PICLDR) { in produceSameValue()
1951 // Don't worry about Thumb: just ARM and Thumb2. in areLoadsFromSameBasePtr()
1961 case ARM::LDRi12: in areLoadsFromSameBasePtr()
1962 case ARM::LDRBi12: in areLoadsFromSameBasePtr()
1963 case ARM::LDRD: in areLoadsFromSameBasePtr()
1964 case ARM::LDRH: in areLoadsFromSameBasePtr()
1965 case ARM::LDRSB: in areLoadsFromSameBasePtr()
1966 case ARM::LDRSH: in areLoadsFromSameBasePtr()
1967 case ARM::VLDRD: in areLoadsFromSameBasePtr()
1968 case ARM::VLDRS: in areLoadsFromSameBasePtr()
1969 case ARM::t2LDRi8: in areLoadsFromSameBasePtr()
1970 case ARM::t2LDRBi8: in areLoadsFromSameBasePtr()
1971 case ARM::t2LDRDi8: in areLoadsFromSameBasePtr()
1972 case ARM::t2LDRSHi8: in areLoadsFromSameBasePtr()
1973 case ARM::t2LDRi12: in areLoadsFromSameBasePtr()
1974 case ARM::t2LDRBi12: in areLoadsFromSameBasePtr()
1975 case ARM::t2LDRSHi12: in areLoadsFromSameBasePtr()
2018 // Don't worry about Thumb: just ARM and Thumb2. in shouldScheduleLoadsNear()
2032 !((Load1->getMachineOpcode() == ARM::t2LDRBi8 && in shouldScheduleLoadsNear()
2033 Load2->getMachineOpcode() == ARM::t2LDRBi12) || in shouldScheduleLoadsNear()
2034 (Load1->getMachineOpcode() == ARM::t2LDRBi12 && in shouldScheduleLoadsNear()
2035 Load2->getMachineOpcode() == ARM::t2LDRBi8))) in shouldScheduleLoadsNear()
2078 if (I != MBB->end() && I->getOpcode() == ARM::t2IT) in isSchedulingBoundary()
2087 // No ARM calling conventions change the stack pointer. (X86 calling in isSchedulingBoundary()
2089 if (!MI.isCall() && MI.definesRegister(ARM::SP, /*TRI=*/nullptr)) in isSchedulingBoundary()
2109 if (LastMI->getOpcode() == ARM::t2Bcc) { in isProfitableToIfCvt()
2189 // ARM has a condition code field in every predicable instruction, using it in extraSizeToPredicateInstructions()
2204 if (MI.getOpcode() == ARM::t2Bcc && in predictBranchSizeForIfCvt()
2246 if (Opc == ARM::B) in getMatchingCondBranchOpcode()
2247 return ARM::Bcc; in getMatchingCondBranchOpcode()
2248 if (Opc == ARM::tB) in getMatchingCondBranchOpcode()
2249 return ARM::tBcc; in getMatchingCondBranchOpcode()
2250 if (Opc == ARM::t2B) in getMatchingCondBranchOpcode()
2251 return ARM::t2Bcc; in getMatchingCondBranchOpcode()
2261 case ARM::MOVCCr: in commuteInstructionImpl()
2262 case ARM::t2MOVCCr: { in commuteInstructionImpl()
2267 if (CC == ARMCC::AL || PredReg != ARM::CPSR) in commuteInstructionImpl()
2323 assert((MI.getOpcode() == ARM::MOVCCr || MI.getOpcode() == ARM::t2MOVCCr) && in analyzeSelect()
2344 assert((MI.getOpcode() == ARM::MOVCCr || MI.getOpcode() == ARM::t2MOVCCr) && in optimizeSelect()
2423 {ARM::ADDSri, ARM::ADDri},
2424 {ARM::ADDSrr, ARM::ADDrr},
2425 {ARM::ADDSrsi, ARM::ADDrsi},
2426 {ARM::ADDSrsr, ARM::ADDrsr},
2428 {ARM::SUBSri, ARM::SUBri},
2429 {ARM::SUBSrr, ARM::SUBrr},
2430 {ARM::SUBSrsi, ARM::SUBrsi},
2431 {ARM::SUBSrsr, ARM::SUBrsr},
2433 {ARM::RSBSri, ARM::RSBri},
2434 {ARM::RSBSrsi, ARM::RSBrsi},
2435 {ARM::RSBSrsr, ARM::RSBrsr},
2437 {ARM::tADDSi3, ARM::tADDi3},
2438 {ARM::tADDSi8, ARM::tADDi8},
2439 {ARM::tADDSrr, ARM::tADDrr},
2440 {ARM::tADCS, ARM::tADC},
2442 {ARM::tSUBSi3, ARM::tSUBi3},
2443 {ARM::tSUBSi8, ARM::tSUBi8},
2444 {ARM::tSUBSrr, ARM::tSUBrr},
2445 {ARM::tSBCS, ARM::tSBC},
2446 {ARM::tRSBS, ARM::tRSB},
2447 {ARM::tLSLSri, ARM::tLSLri},
2449 {ARM::t2ADDSri, ARM::t2ADDri},
2450 {ARM::t2ADDSrr, ARM::t2ADDrr},
2451 {ARM::t2ADDSrs, ARM::t2ADDrs},
2453 {ARM::t2SUBSri, ARM::t2SUBri},
2454 {ARM::t2SUBSrr, ARM::t2SUBrr},
2455 {ARM::t2SUBSrs, ARM::t2SUBrs},
2457 {ARM::t2RSBSri, ARM::t2RSBri},
2458 {ARM::t2RSBSrs, ARM::t2RSBrs},
2476 BuildMI(MBB, MBBI, dl, TII.get(ARM::MOVr), DestReg) in emitARMRegPlusImmediate()
2498 unsigned Opc = isSub ? ARM::SUBri : ARM::ADDri; in emitARMRegPlusImmediate()
2525 bool IsVFPPushPop = MI->getOpcode() == ARM::VSTMDDB_UPD || in tryFoldSPUpdateIntoPushPop()
2526 MI->getOpcode() == ARM::VLDMDIA_UPD; in tryFoldSPUpdateIntoPushPop()
2527 bool IsT1PushPop = MI->getOpcode() == ARM::tPUSH || in tryFoldSPUpdateIntoPushPop()
2528 MI->getOpcode() == ARM::tPOP || in tryFoldSPUpdateIntoPushPop()
2529 MI->getOpcode() == ARM::tPOP_RET; in tryFoldSPUpdateIntoPushPop()
2531 assert((IsT1PushPop || (MI->getOperand(0).getReg() == ARM::SP && in tryFoldSPUpdateIntoPushPop()
2532 MI->getOperand(1).getReg() == ARM::SP)) && in tryFoldSPUpdateIntoPushPop()
2541 // ARM and Thumb2 push/pop insts have explicit "sp, sp" operands (+ in tryFoldSPUpdateIntoPushPop()
2550 RegClass = &ARM::DPRRegClass; in tryFoldSPUpdateIntoPushPop()
2553 RegClass = &ARM::GPRRegClass; in tryFoldSPUpdateIntoPushPop()
2581 if (IsT1PushPop && CurRegEnc > TRI->getEncodingValue(ARM::R7)) in tryFoldSPUpdateIntoPushPop()
2640 if (Opcode == ARM::INLINEASM || Opcode == ARM::INLINEASM_BR) in rewriteARMFrameIndex()
2643 if (Opcode == ARM::ADDri) { in rewriteARMFrameIndex()
2647 MI.setDesc(TII.get(ARM::MOVr)); in rewriteARMFrameIndex()
2655 MI.setDesc(TII.get(ARM::SUBri)); in rewriteARMFrameIndex()
2793 case ARM::CMPri: in analyzeCompare()
2794 case ARM::t2CMPri: in analyzeCompare()
2795 case ARM::tCMPi8: in analyzeCompare()
2801 case ARM::CMPrr: in analyzeCompare()
2802 case ARM::t2CMPrr: in analyzeCompare()
2803 case ARM::tCMPr: in analyzeCompare()
2809 case ARM::TSTri: in analyzeCompare()
2810 case ARM::t2TSTri: in analyzeCompare()
2828 case ARM::ANDri: in isSuitableForMask()
2829 case ARM::t2ANDri: in isSuitableForMask()
2864 if ((CmpI->getOpcode() == ARM::CMPrr || CmpI->getOpcode() == ARM::t2CMPrr) && in isRedundantFlagInstr()
2865 (OI->getOpcode() == ARM::SUBrr || OI->getOpcode() == ARM::t2SUBrr) && in isRedundantFlagInstr()
2874 if (CmpI->getOpcode() == ARM::tCMPr && OI->getOpcode() == ARM::tSUBrr && in isRedundantFlagInstr()
2883 if ((CmpI->getOpcode() == ARM::CMPri || CmpI->getOpcode() == ARM::t2CMPri) && in isRedundantFlagInstr()
2884 (OI->getOpcode() == ARM::SUBri || OI->getOpcode() == ARM::t2SUBri) && in isRedundantFlagInstr()
2891 if (CmpI->getOpcode() == ARM::tCMPi8 && in isRedundantFlagInstr()
2892 (OI->getOpcode() == ARM::tSUBi8 || OI->getOpcode() == ARM::tSUBi3) && in isRedundantFlagInstr()
2899 if ((CmpI->getOpcode() == ARM::CMPrr || CmpI->getOpcode() == ARM::t2CMPrr) && in isRedundantFlagInstr()
2900 (OI->getOpcode() == ARM::ADDrr || OI->getOpcode() == ARM::t2ADDrr || in isRedundantFlagInstr()
2901 OI->getOpcode() == ARM::ADDri || OI->getOpcode() == ARM::t2ADDri) && in isRedundantFlagInstr()
2909 if (CmpI->getOpcode() == ARM::tCMPr && in isRedundantFlagInstr()
2910 (OI->getOpcode() == ARM::tADDi3 || OI->getOpcode() == ARM::tADDi8 || in isRedundantFlagInstr()
2911 OI->getOpcode() == ARM::tADDrr) && in isRedundantFlagInstr()
2924 case ARM::tLSLri: in isOptimizeCompareCandidate()
2925 case ARM::tLSRri: in isOptimizeCompareCandidate()
2926 case ARM::tLSLrr: in isOptimizeCompareCandidate()
2927 case ARM::tLSRrr: in isOptimizeCompareCandidate()
2928 case ARM::tSUBrr: in isOptimizeCompareCandidate()
2929 case ARM::tADDrr: in isOptimizeCompareCandidate()
2930 case ARM::tADDi3: in isOptimizeCompareCandidate()
2931 case ARM::tADDi8: in isOptimizeCompareCandidate()
2932 case ARM::tSUBi3: in isOptimizeCompareCandidate()
2933 case ARM::tSUBi8: in isOptimizeCompareCandidate()
2934 case ARM::tMUL: in isOptimizeCompareCandidate()
2935 case ARM::tADC: in isOptimizeCompareCandidate()
2936 case ARM::tSBC: in isOptimizeCompareCandidate()
2937 case ARM::tRSB: in isOptimizeCompareCandidate()
2938 case ARM::tAND: in isOptimizeCompareCandidate()
2939 case ARM::tORR: in isOptimizeCompareCandidate()
2940 case ARM::tEOR: in isOptimizeCompareCandidate()
2941 case ARM::tBIC: in isOptimizeCompareCandidate()
2942 case ARM::tMVN: in isOptimizeCompareCandidate()
2943 case ARM::tASRri: in isOptimizeCompareCandidate()
2944 case ARM::tASRrr: in isOptimizeCompareCandidate()
2945 case ARM::tROR: in isOptimizeCompareCandidate()
2948 case ARM::RSBrr: in isOptimizeCompareCandidate()
2949 case ARM::RSBri: in isOptimizeCompareCandidate()
2950 case ARM::RSCrr: in isOptimizeCompareCandidate()
2951 case ARM::RSCri: in isOptimizeCompareCandidate()
2952 case ARM::ADDrr: in isOptimizeCompareCandidate()
2953 case ARM::ADDri: in isOptimizeCompareCandidate()
2954 case ARM::ADCrr: in isOptimizeCompareCandidate()
2955 case ARM::ADCri: in isOptimizeCompareCandidate()
2956 case ARM::SUBrr: in isOptimizeCompareCandidate()
2957 case ARM::SUBri: in isOptimizeCompareCandidate()
2958 case ARM::SBCrr: in isOptimizeCompareCandidate()
2959 case ARM::SBCri: in isOptimizeCompareCandidate()
2960 case ARM::t2RSBri: in isOptimizeCompareCandidate()
2961 case ARM::t2ADDrr: in isOptimizeCompareCandidate()
2962 case ARM::t2ADDri: in isOptimizeCompareCandidate()
2963 case ARM::t2ADCrr: in isOptimizeCompareCandidate()
2964 case ARM::t2ADCri: in isOptimizeCompareCandidate()
2965 case ARM::t2SUBrr: in isOptimizeCompareCandidate()
2966 case ARM::t2SUBri: in isOptimizeCompareCandidate()
2967 case ARM::t2SBCrr: in isOptimizeCompareCandidate()
2968 case ARM::t2SBCri: in isOptimizeCompareCandidate()
2969 case ARM::ANDrr: in isOptimizeCompareCandidate()
2970 case ARM::ANDri: in isOptimizeCompareCandidate()
2971 case ARM::ANDrsr: in isOptimizeCompareCandidate()
2972 case ARM::ANDrsi: in isOptimizeCompareCandidate()
2973 case ARM::t2ANDrr: in isOptimizeCompareCandidate()
2974 case ARM::t2ANDri: in isOptimizeCompareCandidate()
2975 case ARM::t2ANDrs: in isOptimizeCompareCandidate()
2976 case ARM::ORRrr: in isOptimizeCompareCandidate()
2977 case ARM::ORRri: in isOptimizeCompareCandidate()
2978 case ARM::ORRrsr: in isOptimizeCompareCandidate()
2979 case ARM::ORRrsi: in isOptimizeCompareCandidate()
2980 case ARM::t2ORRrr: in isOptimizeCompareCandidate()
2981 case ARM::t2ORRri: in isOptimizeCompareCandidate()
2982 case ARM::t2ORRrs: in isOptimizeCompareCandidate()
2983 case ARM::EORrr: in isOptimizeCompareCandidate()
2984 case ARM::EORri: in isOptimizeCompareCandidate()
2985 case ARM::EORrsr: in isOptimizeCompareCandidate()
2986 case ARM::EORrsi: in isOptimizeCompareCandidate()
2987 case ARM::t2EORrr: in isOptimizeCompareCandidate()
2988 case ARM::t2EORri: in isOptimizeCompareCandidate()
2989 case ARM::t2EORrs: in isOptimizeCompareCandidate()
2990 case ARM::BICri: in isOptimizeCompareCandidate()
2991 case ARM::BICrr: in isOptimizeCompareCandidate()
2992 case ARM::BICrsi: in isOptimizeCompareCandidate()
2993 case ARM::BICrsr: in isOptimizeCompareCandidate()
2994 case ARM::t2BICri: in isOptimizeCompareCandidate()
2995 case ARM::t2BICrr: in isOptimizeCompareCandidate()
2996 case ARM::t2BICrs: in isOptimizeCompareCandidate()
2997 case ARM::t2LSRri: in isOptimizeCompareCandidate()
2998 case ARM::t2LSRrr: in isOptimizeCompareCandidate()
2999 case ARM::t2LSLri: in isOptimizeCompareCandidate()
3000 case ARM::t2LSLrr: in isOptimizeCompareCandidate()
3001 case ARM::MOVsr: in isOptimizeCompareCandidate()
3002 case ARM::MOVsi: in isOptimizeCompareCandidate()
3062 if (CmpInstr.getOpcode() == ARM::CMPri || in optimizeCompareInstr()
3063 CmpInstr.getOpcode() == ARM::t2CMPri || in optimizeCompareInstr()
3064 CmpInstr.getOpcode() == ARM::tCMPi8) in optimizeCompareInstr()
3089 if (I != E && !MI->readsRegister(ARM::CPSR, TRI)) { in optimizeCompareInstr()
3092 if (I->getOpcode() != ARM::tMOVi8) { in optimizeCompareInstr()
3124 if (Instr.modifiesRegister(ARM::CPSR, TRI) || in optimizeCompareInstr()
3125 Instr.readsRegister(ARM::CPSR, TRI)) in optimizeCompareInstr()
3170 if (MO.isRegMask() && MO.clobbersPhysReg(ARM::CPSR)) { in optimizeCompareInstr()
3174 if (!MO.isReg() || MO.getReg() != ARM::CPSR) in optimizeCompareInstr()
3188 case ARM::VSELEQD: in optimizeCompareInstr()
3189 case ARM::VSELEQS: in optimizeCompareInstr()
3190 case ARM::VSELEQH: in optimizeCompareInstr()
3193 case ARM::VSELGTD: in optimizeCompareInstr()
3194 case ARM::VSELGTS: in optimizeCompareInstr()
3195 case ARM::VSELGTH: in optimizeCompareInstr()
3198 case ARM::VSELGED: in optimizeCompareInstr()
3199 case ARM::VSELGES: in optimizeCompareInstr()
3200 case ARM::VSELGEH: in optimizeCompareInstr()
3203 case ARM::VSELVSD: in optimizeCompareInstr()
3204 case ARM::VSELVSS: in optimizeCompareInstr()
3205 case ARM::VSELVSH: in optimizeCompareInstr()
3219 bool IsSub = Opc == ARM::SUBrr || Opc == ARM::t2SUBrr || in optimizeCompareInstr()
3220 Opc == ARM::SUBri || Opc == ARM::t2SUBri || in optimizeCompareInstr()
3221 Opc == ARM::tSUBrr || Opc == ARM::tSUBi3 || in optimizeCompareInstr()
3222 Opc == ARM::tSUBi8; in optimizeCompareInstr()
3223 unsigned OpI = Opc != ARM::tSUBrr ? 1 : 2; in optimizeCompareInstr()
3269 if (Succ->isLiveIn(ARM::CPSR)) in optimizeCompareInstr()
3277 MI->getOperand(CPSRRegNum).setReg(ARM::CPSR); in optimizeCompareInstr()
3289 MI->clearRegisterDeads(ARM::CPSR); in optimizeCompareInstr()
3317 if (DefOpc != ARM::t2MOVi32imm && DefOpc != ARM::MOVi32imm && in foldImmediate()
3318 DefOpc != ARM::tMOVi32imm) in foldImmediate()
3331 if (MO.getReg() == ARM::CPSR && !MO.isDead()) in foldImmediate()
3340 if (UseMI.getOperand(NumOps - 1).getReg() == ARM::CPSR) in foldImmediate()
3353 case ARM::SUBrr: in foldImmediate()
3354 case ARM::ADDrr: in foldImmediate()
3355 case ARM::ORRrr: in foldImmediate()
3356 case ARM::EORrr: in foldImmediate()
3357 case ARM::t2SUBrr: in foldImmediate()
3358 case ARM::t2ADDrr: in foldImmediate()
3359 case ARM::t2ORRrr: in foldImmediate()
3360 case ARM::t2EORrr: { in foldImmediate()
3364 case ARM::ADDrr: in foldImmediate()
3365 case ARM::SUBrr: in foldImmediate()
3366 if (UseOpc == ARM::SUBrr && Commute) in foldImmediate()
3372 NewUseOpc = UseOpc == ARM::ADDrr ? ARM::ADDri : ARM::SUBri; in foldImmediate()
3375 NewUseOpc = UseOpc == ARM::ADDrr ? ARM::SUBri : ARM::ADDri; in foldImmediate()
3381 case ARM::ORRrr: in foldImmediate()
3382 case ARM::EORrr: in foldImmediate()
3389 case ARM::ORRrr: NewUseOpc = ARM::ORRri; break; in foldImmediate()
3390 case ARM::EORrr: NewUseOpc = ARM::EORri; break; in foldImmediate()
3393 case ARM::t2ADDrr: in foldImmediate()
3394 case ARM::t2SUBrr: { in foldImmediate()
3395 if (UseOpc == ARM::t2SUBrr && Commute) in foldImmediate()
3400 const bool ToSP = DefMI.getOperand(0).getReg() == ARM::SP; in foldImmediate()
3401 const unsigned t2ADD = ToSP ? ARM::t2ADDspImm : ARM::t2ADDri; in foldImmediate()
3402 const unsigned t2SUB = ToSP ? ARM::t2SUBspImm : ARM::t2SUBri; in foldImmediate()
3404 NewUseOpc = UseOpc == ARM::t2ADDrr ? t2ADD : t2SUB; in foldImmediate()
3407 NewUseOpc = UseOpc == ARM::t2ADDrr ? t2SUB : t2ADD; in foldImmediate()
3414 case ARM::t2ORRrr: in foldImmediate()
3415 case ARM::t2EORrr: in foldImmediate()
3422 case ARM::t2ORRrr: NewUseOpc = ARM::t2ORRri; break; in foldImmediate()
3423 case ARM::t2EORrr: NewUseOpc = ARM::t2EORri; break; in foldImmediate()
3452 case ARM::t2ADDspImm: in foldImmediate()
3453 case ARM::t2SUBspImm: in foldImmediate()
3454 case ARM::t2ADDri: in foldImmediate()
3455 case ARM::t2SUBri: in foldImmediate()
3471 case ARM::LDRrs: in getNumMicroOpsSwiftLdSt()
3472 case ARM::LDRBrs: in getNumMicroOpsSwiftLdSt()
3473 case ARM::STRrs: in getNumMicroOpsSwiftLdSt()
3474 case ARM::STRBrs: { in getNumMicroOpsSwiftLdSt()
3486 case ARM::LDRH: in getNumMicroOpsSwiftLdSt()
3487 case ARM::STRH: { in getNumMicroOpsSwiftLdSt()
3502 case ARM::LDRSB: in getNumMicroOpsSwiftLdSt()
3503 case ARM::LDRSH: in getNumMicroOpsSwiftLdSt()
3506 case ARM::LDRSB_POST: in getNumMicroOpsSwiftLdSt()
3507 case ARM::LDRSH_POST: { in getNumMicroOpsSwiftLdSt()
3513 case ARM::LDR_PRE_REG: in getNumMicroOpsSwiftLdSt()
3514 case ARM::LDRB_PRE_REG: { in getNumMicroOpsSwiftLdSt()
3530 case ARM::STR_PRE_REG: in getNumMicroOpsSwiftLdSt()
3531 case ARM::STRB_PRE_REG: { in getNumMicroOpsSwiftLdSt()
3543 case ARM::LDRH_PRE: in getNumMicroOpsSwiftLdSt()
3544 case ARM::STRH_PRE: { in getNumMicroOpsSwiftLdSt()
3554 case ARM::LDR_POST_REG: in getNumMicroOpsSwiftLdSt()
3555 case ARM::LDRB_POST_REG: in getNumMicroOpsSwiftLdSt()
3556 case ARM::LDRH_POST: { in getNumMicroOpsSwiftLdSt()
3562 case ARM::LDR_PRE_IMM: in getNumMicroOpsSwiftLdSt()
3563 case ARM::LDRB_PRE_IMM: in getNumMicroOpsSwiftLdSt()
3564 case ARM::LDR_POST_IMM: in getNumMicroOpsSwiftLdSt()
3565 case ARM::LDRB_POST_IMM: in getNumMicroOpsSwiftLdSt()
3566 case ARM::STRB_POST_IMM: in getNumMicroOpsSwiftLdSt()
3567 case ARM::STRB_POST_REG: in getNumMicroOpsSwiftLdSt()
3568 case ARM::STRB_PRE_IMM: in getNumMicroOpsSwiftLdSt()
3569 case ARM::STRH_POST: in getNumMicroOpsSwiftLdSt()
3570 case ARM::STR_POST_IMM: in getNumMicroOpsSwiftLdSt()
3571 case ARM::STR_POST_REG: in getNumMicroOpsSwiftLdSt()
3572 case ARM::STR_PRE_IMM: in getNumMicroOpsSwiftLdSt()
3575 case ARM::LDRSB_PRE: in getNumMicroOpsSwiftLdSt()
3576 case ARM::LDRSH_PRE: { in getNumMicroOpsSwiftLdSt()
3594 case ARM::LDRD: { in getNumMicroOpsSwiftLdSt()
3604 case ARM::STRD: { in getNumMicroOpsSwiftLdSt()
3612 case ARM::LDRD_POST: in getNumMicroOpsSwiftLdSt()
3613 case ARM::t2LDRD_POST: in getNumMicroOpsSwiftLdSt()
3616 case ARM::STRD_POST: in getNumMicroOpsSwiftLdSt()
3617 case ARM::t2STRD_POST: in getNumMicroOpsSwiftLdSt()
3620 case ARM::LDRD_PRE: { in getNumMicroOpsSwiftLdSt()
3630 case ARM::t2LDRD_PRE: { in getNumMicroOpsSwiftLdSt()
3636 case ARM::STRD_PRE: { in getNumMicroOpsSwiftLdSt()
3644 case ARM::t2STRD_PRE: in getNumMicroOpsSwiftLdSt()
3647 case ARM::t2LDR_POST: in getNumMicroOpsSwiftLdSt()
3648 case ARM::t2LDRB_POST: in getNumMicroOpsSwiftLdSt()
3649 case ARM::t2LDRB_PRE: in getNumMicroOpsSwiftLdSt()
3650 case ARM::t2LDRSBi12: in getNumMicroOpsSwiftLdSt()
3651 case ARM::t2LDRSBi8: in getNumMicroOpsSwiftLdSt()
3652 case ARM::t2LDRSBpci: in getNumMicroOpsSwiftLdSt()
3653 case ARM::t2LDRSBs: in getNumMicroOpsSwiftLdSt()
3654 case ARM::t2LDRH_POST: in getNumMicroOpsSwiftLdSt()
3655 case ARM::t2LDRH_PRE: in getNumMicroOpsSwiftLdSt()
3656 case ARM::t2LDRSBT: in getNumMicroOpsSwiftLdSt()
3657 case ARM::t2LDRSB_POST: in getNumMicroOpsSwiftLdSt()
3658 case ARM::t2LDRSB_PRE: in getNumMicroOpsSwiftLdSt()
3659 case ARM::t2LDRSH_POST: in getNumMicroOpsSwiftLdSt()
3660 case ARM::t2LDRSH_PRE: in getNumMicroOpsSwiftLdSt()
3661 case ARM::t2LDRSHi12: in getNumMicroOpsSwiftLdSt()
3662 case ARM::t2LDRSHi8: in getNumMicroOpsSwiftLdSt()
3663 case ARM::t2LDRSHpci: in getNumMicroOpsSwiftLdSt()
3664 case ARM::t2LDRSHs: in getNumMicroOpsSwiftLdSt()
3667 case ARM::t2LDRDi8: { in getNumMicroOpsSwiftLdSt()
3673 case ARM::t2STRB_POST: in getNumMicroOpsSwiftLdSt()
3674 case ARM::t2STRB_PRE: in getNumMicroOpsSwiftLdSt()
3675 case ARM::t2STRBs: in getNumMicroOpsSwiftLdSt()
3676 case ARM::t2STRDi8: in getNumMicroOpsSwiftLdSt()
3677 case ARM::t2STRH_POST: in getNumMicroOpsSwiftLdSt()
3678 case ARM::t2STRH_PRE: in getNumMicroOpsSwiftLdSt()
3679 case ARM::t2STRHs: in getNumMicroOpsSwiftLdSt()
3680 case ARM::t2STR_POST: in getNumMicroOpsSwiftLdSt()
3681 case ARM::t2STR_PRE: in getNumMicroOpsSwiftLdSt()
3682 case ARM::t2STRs: in getNumMicroOpsSwiftLdSt()
3730 case ARM::VLDMDIA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3731 case ARM::VLDMDDB_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3732 case ARM::VLDMSIA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3733 case ARM::VLDMSDB_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3734 case ARM::VSTMDIA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3735 case ARM::VSTMDDB_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3736 case ARM::VSTMSIA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3737 case ARM::VSTMSDB_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3738 case ARM::LDMIA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3739 case ARM::LDMDA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3740 case ARM::LDMDB_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3741 case ARM::LDMIB_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3742 case ARM::STMIA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3743 case ARM::STMDA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3744 case ARM::STMDB_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3745 case ARM::STMIB_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3746 case ARM::tLDMIA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3747 case ARM::tSTMIA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3748 case ARM::t2LDMIA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3749 case ARM::t2LDMDB_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3750 case ARM::t2STMIA_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3751 case ARM::t2STMDB_UPD: in getNumMicroOpsSingleIssuePlusExtras()
3754 case ARM::LDMIA_RET: in getNumMicroOpsSingleIssuePlusExtras()
3755 case ARM::tPOP_RET: in getNumMicroOpsSingleIssuePlusExtras()
3756 case ARM::t2LDMIA_RET: in getNumMicroOpsSingleIssuePlusExtras()
3782 case ARM::VLDMQIA: in getNumMicroOps()
3783 case ARM::VSTMQIA: in getNumMicroOps()
3796 case ARM::VLDMDIA: in getNumMicroOps()
3797 case ARM::VLDMDIA_UPD: in getNumMicroOps()
3798 case ARM::VLDMDDB_UPD: in getNumMicroOps()
3799 case ARM::VLDMSIA: in getNumMicroOps()
3800 case ARM::VLDMSIA_UPD: in getNumMicroOps()
3801 case ARM::VLDMSDB_UPD: in getNumMicroOps()
3802 case ARM::VSTMDIA: in getNumMicroOps()
3803 case ARM::VSTMDIA_UPD: in getNumMicroOps()
3804 case ARM::VSTMDDB_UPD: in getNumMicroOps()
3805 case ARM::VSTMSIA: in getNumMicroOps()
3806 case ARM::VSTMSIA_UPD: in getNumMicroOps()
3807 case ARM::VSTMSDB_UPD: { in getNumMicroOps()
3812 case ARM::LDMIA_RET: in getNumMicroOps()
3813 case ARM::LDMIA: in getNumMicroOps()
3814 case ARM::LDMDA: in getNumMicroOps()
3815 case ARM::LDMDB: in getNumMicroOps()
3816 case ARM::LDMIB: in getNumMicroOps()
3817 case ARM::LDMIA_UPD: in getNumMicroOps()
3818 case ARM::LDMDA_UPD: in getNumMicroOps()
3819 case ARM::LDMDB_UPD: in getNumMicroOps()
3820 case ARM::LDMIB_UPD: in getNumMicroOps()
3821 case ARM::STMIA: in getNumMicroOps()
3822 case ARM::STMDA: in getNumMicroOps()
3823 case ARM::STMDB: in getNumMicroOps()
3824 case ARM::STMIB: in getNumMicroOps()
3825 case ARM::STMIA_UPD: in getNumMicroOps()
3826 case ARM::STMDA_UPD: in getNumMicroOps()
3827 case ARM::STMDB_UPD: in getNumMicroOps()
3828 case ARM::STMIB_UPD: in getNumMicroOps()
3829 case ARM::tLDMIA: in getNumMicroOps()
3830 case ARM::tLDMIA_UPD: in getNumMicroOps()
3831 case ARM::tSTMIA_UPD: in getNumMicroOps()
3832 case ARM::tPOP_RET: in getNumMicroOps()
3833 case ARM::tPOP: in getNumMicroOps()
3834 case ARM::tPUSH: in getNumMicroOps()
3835 case ARM::t2LDMIA_RET: in getNumMicroOps()
3836 case ARM::t2LDMIA: in getNumMicroOps()
3837 case ARM::t2LDMDB: in getNumMicroOps()
3838 case ARM::t2LDMIA_UPD: in getNumMicroOps()
3839 case ARM::t2LDMDB_UPD: in getNumMicroOps()
3840 case ARM::t2STMIA: in getNumMicroOps()
3841 case ARM::t2STMDB: in getNumMicroOps()
3842 case ARM::t2STMIA_UPD: in getNumMicroOps()
3843 case ARM::t2STMDB_UPD: { in getNumMicroOps()
3897 case ARM::VLDMSIA: in getVLDMDefCycle()
3898 case ARM::VLDMSIA_UPD: in getVLDMDefCycle()
3899 case ARM::VLDMSDB_UPD: in getVLDMDefCycle()
3970 case ARM::VSTMSIA: in getVSTMUseCycle()
3971 case ARM::VSTMSIA_UPD: in getVSTMUseCycle()
3972 case ARM::VSTMSDB_UPD: in getVSTMUseCycle()
4037 case ARM::VLDMDIA: in getOperandLatency()
4038 case ARM::VLDMDIA_UPD: in getOperandLatency()
4039 case ARM::VLDMDDB_UPD: in getOperandLatency()
4040 case ARM::VLDMSIA: in getOperandLatency()
4041 case ARM::VLDMSIA_UPD: in getOperandLatency()
4042 case ARM::VLDMSDB_UPD: in getOperandLatency()
4046 case ARM::LDMIA_RET: in getOperandLatency()
4047 case ARM::LDMIA: in getOperandLatency()
4048 case ARM::LDMDA: in getOperandLatency()
4049 case ARM::LDMDB: in getOperandLatency()
4050 case ARM::LDMIB: in getOperandLatency()
4051 case ARM::LDMIA_UPD: in getOperandLatency()
4052 case ARM::LDMDA_UPD: in getOperandLatency()
4053 case ARM::LDMDB_UPD: in getOperandLatency()
4054 case ARM::LDMIB_UPD: in getOperandLatency()
4055 case ARM::tLDMIA: in getOperandLatency()
4056 case ARM::tLDMIA_UPD: in getOperandLatency()
4057 case ARM::tPUSH: in getOperandLatency()
4058 case ARM::t2LDMIA_RET: in getOperandLatency()
4059 case ARM::t2LDMIA: in getOperandLatency()
4060 case ARM::t2LDMDB: in getOperandLatency()
4061 case ARM::t2LDMIA_UPD: in getOperandLatency()
4062 case ARM::t2LDMDB_UPD: in getOperandLatency()
4078 case ARM::VSTMDIA: in getOperandLatency()
4079 case ARM::VSTMDIA_UPD: in getOperandLatency()
4080 case ARM::VSTMDDB_UPD: in getOperandLatency()
4081 case ARM::VSTMSIA: in getOperandLatency()
4082 case ARM::VSTMSIA_UPD: in getOperandLatency()
4083 case ARM::VSTMSDB_UPD: in getOperandLatency()
4087 case ARM::STMIA: in getOperandLatency()
4088 case ARM::STMDA: in getOperandLatency()
4089 case ARM::STMDB: in getOperandLatency()
4090 case ARM::STMIB: in getOperandLatency()
4091 case ARM::STMIA_UPD: in getOperandLatency()
4092 case ARM::STMDA_UPD: in getOperandLatency()
4093 case ARM::STMDB_UPD: in getOperandLatency()
4094 case ARM::STMIB_UPD: in getOperandLatency()
4095 case ARM::tSTMIA_UPD: in getOperandLatency()
4096 case ARM::tPOP_RET: in getOperandLatency()
4097 case ARM::tPOP: in getOperandLatency()
4098 case ARM::t2STMIA: in getOperandLatency()
4099 case ARM::t2STMDB: in getOperandLatency()
4100 case ARM::t2STMIA_UPD: in getOperandLatency()
4101 case ARM::t2STMDB_UPD: in getOperandLatency()
4168 if (II->getOpcode() != ARM::t2IT) in getBundledUseMI()
4194 case ARM::LDRrs: in adjustDefLatency()
4195 case ARM::LDRBrs: { in adjustDefLatency()
4203 case ARM::t2LDRs: in adjustDefLatency()
4204 case ARM::t2LDRBs: in adjustDefLatency()
4205 case ARM::t2LDRHs: in adjustDefLatency()
4206 case ARM::t2LDRSHs: { in adjustDefLatency()
4219 case ARM::LDRrs: in adjustDefLatency()
4220 case ARM::LDRBrs: { in adjustDefLatency()
4234 case ARM::t2LDRs: in adjustDefLatency()
4235 case ARM::t2LDRBs: in adjustDefLatency()
4236 case ARM::t2LDRHs: in adjustDefLatency()
4237 case ARM::t2LDRSHs: { in adjustDefLatency()
4250 case ARM::VLD1q8: in adjustDefLatency()
4251 case ARM::VLD1q16: in adjustDefLatency()
4252 case ARM::VLD1q32: in adjustDefLatency()
4253 case ARM::VLD1q64: in adjustDefLatency()
4254 case ARM::VLD1q8wb_fixed: in adjustDefLatency()
4255 case ARM::VLD1q16wb_fixed: in adjustDefLatency()
4256 case ARM::VLD1q32wb_fixed: in adjustDefLatency()
4257 case ARM::VLD1q64wb_fixed: in adjustDefLatency()
4258 case ARM::VLD1q8wb_register: in adjustDefLatency()
4259 case ARM::VLD1q16wb_register: in adjustDefLatency()
4260 case ARM::VLD1q32wb_register: in adjustDefLatency()
4261 case ARM::VLD1q64wb_register: in adjustDefLatency()
4262 case ARM::VLD2d8: in adjustDefLatency()
4263 case ARM::VLD2d16: in adjustDefLatency()
4264 case ARM::VLD2d32: in adjustDefLatency()
4265 case ARM::VLD2q8: in adjustDefLatency()
4266 case ARM::VLD2q16: in adjustDefLatency()
4267 case ARM::VLD2q32: in adjustDefLatency()
4268 case ARM::VLD2d8wb_fixed: in adjustDefLatency()
4269 case ARM::VLD2d16wb_fixed: in adjustDefLatency()
4270 case ARM::VLD2d32wb_fixed: in adjustDefLatency()
4271 case ARM::VLD2q8wb_fixed: in adjustDefLatency()
4272 case ARM::VLD2q16wb_fixed: in adjustDefLatency()
4273 case ARM::VLD2q32wb_fixed: in adjustDefLatency()
4274 case ARM::VLD2d8wb_register: in adjustDefLatency()
4275 case ARM::VLD2d16wb_register: in adjustDefLatency()
4276 case ARM::VLD2d32wb_register: in adjustDefLatency()
4277 case ARM::VLD2q8wb_register: in adjustDefLatency()
4278 case ARM::VLD2q16wb_register: in adjustDefLatency()
4279 case ARM::VLD2q32wb_register: in adjustDefLatency()
4280 case ARM::VLD3d8: in adjustDefLatency()
4281 case ARM::VLD3d16: in adjustDefLatency()
4282 case ARM::VLD3d32: in adjustDefLatency()
4283 case ARM::VLD1d64T: in adjustDefLatency()
4284 case ARM::VLD3d8_UPD: in adjustDefLatency()
4285 case ARM::VLD3d16_UPD: in adjustDefLatency()
4286 case ARM::VLD3d32_UPD: in adjustDefLatency()
4287 case ARM::VLD1d64Twb_fixed: in adjustDefLatency()
4288 case ARM::VLD1d64Twb_register: in adjustDefLatency()
4289 case ARM::VLD3q8_UPD: in adjustDefLatency()
4290 case ARM::VLD3q16_UPD: in adjustDefLatency()
4291 case ARM::VLD3q32_UPD: in adjustDefLatency()
4292 case ARM::VLD4d8: in adjustDefLatency()
4293 case ARM::VLD4d16: in adjustDefLatency()
4294 case ARM::VLD4d32: in adjustDefLatency()
4295 case ARM::VLD1d64Q: in adjustDefLatency()
4296 case ARM::VLD4d8_UPD: in adjustDefLatency()
4297 case ARM::VLD4d16_UPD: in adjustDefLatency()
4298 case ARM::VLD4d32_UPD: in adjustDefLatency()
4299 case ARM::VLD1d64Qwb_fixed: in adjustDefLatency()
4300 case ARM::VLD1d64Qwb_register: in adjustDefLatency()
4301 case ARM::VLD4q8_UPD: in adjustDefLatency()
4302 case ARM::VLD4q16_UPD: in adjustDefLatency()
4303 case ARM::VLD4q32_UPD: in adjustDefLatency()
4304 case ARM::VLD1DUPq8: in adjustDefLatency()
4305 case ARM::VLD1DUPq16: in adjustDefLatency()
4306 case ARM::VLD1DUPq32: in adjustDefLatency()
4307 case ARM::VLD1DUPq8wb_fixed: in adjustDefLatency()
4308 case ARM::VLD1DUPq16wb_fixed: in adjustDefLatency()
4309 case ARM::VLD1DUPq32wb_fixed: in adjustDefLatency()
4310 case ARM::VLD1DUPq8wb_register: in adjustDefLatency()
4311 case ARM::VLD1DUPq16wb_register: in adjustDefLatency()
4312 case ARM::VLD1DUPq32wb_register: in adjustDefLatency()
4313 case ARM::VLD2DUPd8: in adjustDefLatency()
4314 case ARM::VLD2DUPd16: in adjustDefLatency()
4315 case ARM::VLD2DUPd32: in adjustDefLatency()
4316 case ARM::VLD2DUPd8wb_fixed: in adjustDefLatency()
4317 case ARM::VLD2DUPd16wb_fixed: in adjustDefLatency()
4318 case ARM::VLD2DUPd32wb_fixed: in adjustDefLatency()
4319 case ARM::VLD2DUPd8wb_register: in adjustDefLatency()
4320 case ARM::VLD2DUPd16wb_register: in adjustDefLatency()
4321 case ARM::VLD2DUPd32wb_register: in adjustDefLatency()
4322 case ARM::VLD4DUPd8: in adjustDefLatency()
4323 case ARM::VLD4DUPd16: in adjustDefLatency()
4324 case ARM::VLD4DUPd32: in adjustDefLatency()
4325 case ARM::VLD4DUPd8_UPD: in adjustDefLatency()
4326 case ARM::VLD4DUPd16_UPD: in adjustDefLatency()
4327 case ARM::VLD4DUPd32_UPD: in adjustDefLatency()
4328 case ARM::VLD1LNd8: in adjustDefLatency()
4329 case ARM::VLD1LNd16: in adjustDefLatency()
4330 case ARM::VLD1LNd32: in adjustDefLatency()
4331 case ARM::VLD1LNd8_UPD: in adjustDefLatency()
4332 case ARM::VLD1LNd16_UPD: in adjustDefLatency()
4333 case ARM::VLD1LNd32_UPD: in adjustDefLatency()
4334 case ARM::VLD2LNd8: in adjustDefLatency()
4335 case ARM::VLD2LNd16: in adjustDefLatency()
4336 case ARM::VLD2LNd32: in adjustDefLatency()
4337 case ARM::VLD2LNq16: in adjustDefLatency()
4338 case ARM::VLD2LNq32: in adjustDefLatency()
4339 case ARM::VLD2LNd8_UPD: in adjustDefLatency()
4340 case ARM::VLD2LNd16_UPD: in adjustDefLatency()
4341 case ARM::VLD2LNd32_UPD: in adjustDefLatency()
4342 case ARM::VLD2LNq16_UPD: in adjustDefLatency()
4343 case ARM::VLD2LNq32_UPD: in adjustDefLatency()
4344 case ARM::VLD4LNd8: in adjustDefLatency()
4345 case ARM::VLD4LNd16: in adjustDefLatency()
4346 case ARM::VLD4LNd32: in adjustDefLatency()
4347 case ARM::VLD4LNq16: in adjustDefLatency()
4348 case ARM::VLD4LNq32: in adjustDefLatency()
4349 case ARM::VLD4LNd8_UPD: in adjustDefLatency()
4350 case ARM::VLD4LNd16_UPD: in adjustDefLatency()
4351 case ARM::VLD4LNd32_UPD: in adjustDefLatency()
4352 case ARM::VLD4LNq16_UPD: in adjustDefLatency()
4353 case ARM::VLD4LNq32_UPD: in adjustDefLatency()
4402 if (Reg == ARM::CPSR) { in getOperandLatencyImpl()
4403 if (DefMI.getOpcode() == ARM::FMSTAT) { in getOperandLatencyImpl()
4501 case ARM::LDRrs: in getOperandLatency()
4502 case ARM::LDRBrs: { in getOperandLatency()
4510 case ARM::t2LDRs: in getOperandLatency()
4511 case ARM::t2LDRBs: in getOperandLatency()
4512 case ARM::t2LDRHs: in getOperandLatency()
4513 case ARM::t2LDRSHs: { in getOperandLatency()
4526 case ARM::LDRrs: in getOperandLatency()
4527 case ARM::LDRBrs: { in getOperandLatency()
4538 case ARM::t2LDRs: in getOperandLatency()
4539 case ARM::t2LDRBs: in getOperandLatency()
4540 case ARM::t2LDRHs: in getOperandLatency()
4541 case ARM::t2LDRSHs: in getOperandLatency()
4551 case ARM::VLD1q8: in getOperandLatency()
4552 case ARM::VLD1q16: in getOperandLatency()
4553 case ARM::VLD1q32: in getOperandLatency()
4554 case ARM::VLD1q64: in getOperandLatency()
4555 case ARM::VLD1q8wb_register: in getOperandLatency()
4556 case ARM::VLD1q16wb_register: in getOperandLatency()
4557 case ARM::VLD1q32wb_register: in getOperandLatency()
4558 case ARM::VLD1q64wb_register: in getOperandLatency()
4559 case ARM::VLD1q8wb_fixed: in getOperandLatency()
4560 case ARM::VLD1q16wb_fixed: in getOperandLatency()
4561 case ARM::VLD1q32wb_fixed: in getOperandLatency()
4562 case ARM::VLD1q64wb_fixed: in getOperandLatency()
4563 case ARM::VLD2d8: in getOperandLatency()
4564 case ARM::VLD2d16: in getOperandLatency()
4565 case ARM::VLD2d32: in getOperandLatency()
4566 case ARM::VLD2q8Pseudo: in getOperandLatency()
4567 case ARM::VLD2q16Pseudo: in getOperandLatency()
4568 case ARM::VLD2q32Pseudo: in getOperandLatency()
4569 case ARM::VLD2d8wb_fixed: in getOperandLatency()
4570 case ARM::VLD2d16wb_fixed: in getOperandLatency()
4571 case ARM::VLD2d32wb_fixed: in getOperandLatency()
4572 case ARM::VLD2q8PseudoWB_fixed: in getOperandLatency()
4573 case ARM::VLD2q16PseudoWB_fixed: in getOperandLatency()
4574 case ARM::VLD2q32PseudoWB_fixed: in getOperandLatency()
4575 case ARM::VLD2d8wb_register: in getOperandLatency()
4576 case ARM::VLD2d16wb_register: in getOperandLatency()
4577 case ARM::VLD2d32wb_register: in getOperandLatency()
4578 case ARM::VLD2q8PseudoWB_register: in getOperandLatency()
4579 case ARM::VLD2q16PseudoWB_register: in getOperandLatency()
4580 case ARM::VLD2q32PseudoWB_register: in getOperandLatency()
4581 case ARM::VLD3d8Pseudo: in getOperandLatency()
4582 case ARM::VLD3d16Pseudo: in getOperandLatency()
4583 case ARM::VLD3d32Pseudo: in getOperandLatency()
4584 case ARM::VLD1d8TPseudo: in getOperandLatency()
4585 case ARM::VLD1d16TPseudo: in getOperandLatency()
4586 case ARM::VLD1d32TPseudo: in getOperandLatency()
4587 case ARM::VLD1d64TPseudo: in getOperandLatency()
4588 case ARM::VLD1d64TPseudoWB_fixed: in getOperandLatency()
4589 case ARM::VLD1d64TPseudoWB_register: in getOperandLatency()
4590 case ARM::VLD3d8Pseudo_UPD: in getOperandLatency()
4591 case ARM::VLD3d16Pseudo_UPD: in getOperandLatency()
4592 case ARM::VLD3d32Pseudo_UPD: in getOperandLatency()
4593 case ARM::VLD3q8Pseudo_UPD: in getOperandLatency()
4594 case ARM::VLD3q16Pseudo_UPD: in getOperandLatency()
4595 case ARM::VLD3q32Pseudo_UPD: in getOperandLatency()
4596 case ARM::VLD3q8oddPseudo: in getOperandLatency()
4597 case ARM::VLD3q16oddPseudo: in getOperandLatency()
4598 case ARM::VLD3q32oddPseudo: in getOperandLatency()
4599 case ARM::VLD3q8oddPseudo_UPD: in getOperandLatency()
4600 case ARM::VLD3q16oddPseudo_UPD: in getOperandLatency()
4601 case ARM::VLD3q32oddPseudo_UPD: in getOperandLatency()
4602 case ARM::VLD4d8Pseudo: in getOperandLatency()
4603 case ARM::VLD4d16Pseudo: in getOperandLatency()
4604 case ARM::VLD4d32Pseudo: in getOperandLatency()
4605 case ARM::VLD1d8QPseudo: in getOperandLatency()
4606 case ARM::VLD1d16QPseudo: in getOperandLatency()
4607 case ARM::VLD1d32QPseudo: in getOperandLatency()
4608 case ARM::VLD1d64QPseudo: in getOperandLatency()
4609 case ARM::VLD1d64QPseudoWB_fixed: in getOperandLatency()
4610 case ARM::VLD1d64QPseudoWB_register: in getOperandLatency()
4611 case ARM::VLD1q8HighQPseudo: in getOperandLatency()
4612 case ARM::VLD1q8LowQPseudo_UPD: in getOperandLatency()
4613 case ARM::VLD1q8HighTPseudo: in getOperandLatency()
4614 case ARM::VLD1q8LowTPseudo_UPD: in getOperandLatency()
4615 case ARM::VLD1q16HighQPseudo: in getOperandLatency()
4616 case ARM::VLD1q16LowQPseudo_UPD: in getOperandLatency()
4617 case ARM::VLD1q16HighTPseudo: in getOperandLatency()
4618 case ARM::VLD1q16LowTPseudo_UPD: in getOperandLatency()
4619 case ARM::VLD1q32HighQPseudo: in getOperandLatency()
4620 case ARM::VLD1q32LowQPseudo_UPD: in getOperandLatency()
4621 case ARM::VLD1q32HighTPseudo: in getOperandLatency()
4622 case ARM::VLD1q32LowTPseudo_UPD: in getOperandLatency()
4623 case ARM::VLD1q64HighQPseudo: in getOperandLatency()
4624 case ARM::VLD1q64LowQPseudo_UPD: in getOperandLatency()
4625 case ARM::VLD1q64HighTPseudo: in getOperandLatency()
4626 case ARM::VLD1q64LowTPseudo_UPD: in getOperandLatency()
4627 case ARM::VLD4d8Pseudo_UPD: in getOperandLatency()
4628 case ARM::VLD4d16Pseudo_UPD: in getOperandLatency()
4629 case ARM::VLD4d32Pseudo_UPD: in getOperandLatency()
4630 case ARM::VLD4q8Pseudo_UPD: in getOperandLatency()
4631 case ARM::VLD4q16Pseudo_UPD: in getOperandLatency()
4632 case ARM::VLD4q32Pseudo_UPD: in getOperandLatency()
4633 case ARM::VLD4q8oddPseudo: in getOperandLatency()
4634 case ARM::VLD4q16oddPseudo: in getOperandLatency()
4635 case ARM::VLD4q32oddPseudo: in getOperandLatency()
4636 case ARM::VLD4q8oddPseudo_UPD: in getOperandLatency()
4637 case ARM::VLD4q16oddPseudo_UPD: in getOperandLatency()
4638 case ARM::VLD4q32oddPseudo_UPD: in getOperandLatency()
4639 case ARM::VLD1DUPq8: in getOperandLatency()
4640 case ARM::VLD1DUPq16: in getOperandLatency()
4641 case ARM::VLD1DUPq32: in getOperandLatency()
4642 case ARM::VLD1DUPq8wb_fixed: in getOperandLatency()
4643 case ARM::VLD1DUPq16wb_fixed: in getOperandLatency()
4644 case ARM::VLD1DUPq32wb_fixed: in getOperandLatency()
4645 case ARM::VLD1DUPq8wb_register: in getOperandLatency()
4646 case ARM::VLD1DUPq16wb_register: in getOperandLatency()
4647 case ARM::VLD1DUPq32wb_register: in getOperandLatency()
4648 case ARM::VLD2DUPd8: in getOperandLatency()
4649 case ARM::VLD2DUPd16: in getOperandLatency()
4650 case ARM::VLD2DUPd32: in getOperandLatency()
4651 case ARM::VLD2DUPd8wb_fixed: in getOperandLatency()
4652 case ARM::VLD2DUPd16wb_fixed: in getOperandLatency()
4653 case ARM::VLD2DUPd32wb_fixed: in getOperandLatency()
4654 case ARM::VLD2DUPd8wb_register: in getOperandLatency()
4655 case ARM::VLD2DUPd16wb_register: in getOperandLatency()
4656 case ARM::VLD2DUPd32wb_register: in getOperandLatency()
4657 case ARM::VLD2DUPq8EvenPseudo: in getOperandLatency()
4658 case ARM::VLD2DUPq8OddPseudo: in getOperandLatency()
4659 case ARM::VLD2DUPq16EvenPseudo: in getOperandLatency()
4660 case ARM::VLD2DUPq16OddPseudo: in getOperandLatency()
4661 case ARM::VLD2DUPq32EvenPseudo: in getOperandLatency()
4662 case ARM::VLD2DUPq32OddPseudo: in getOperandLatency()
4663 case ARM::VLD3DUPq8EvenPseudo: in getOperandLatency()
4664 case ARM::VLD3DUPq8OddPseudo: in getOperandLatency()
4665 case ARM::VLD3DUPq16EvenPseudo: in getOperandLatency()
4666 case ARM::VLD3DUPq16OddPseudo: in getOperandLatency()
4667 case ARM::VLD3DUPq32EvenPseudo: in getOperandLatency()
4668 case ARM::VLD3DUPq32OddPseudo: in getOperandLatency()
4669 case ARM::VLD4DUPd8Pseudo: in getOperandLatency()
4670 case ARM::VLD4DUPd16Pseudo: in getOperandLatency()
4671 case ARM::VLD4DUPd32Pseudo: in getOperandLatency()
4672 case ARM::VLD4DUPd8Pseudo_UPD: in getOperandLatency()
4673 case ARM::VLD4DUPd16Pseudo_UPD: in getOperandLatency()
4674 case ARM::VLD4DUPd32Pseudo_UPD: in getOperandLatency()
4675 case ARM::VLD4DUPq8EvenPseudo: in getOperandLatency()
4676 case ARM::VLD4DUPq8OddPseudo: in getOperandLatency()
4677 case ARM::VLD4DUPq16EvenPseudo: in getOperandLatency()
4678 case ARM::VLD4DUPq16OddPseudo: in getOperandLatency()
4679 case ARM::VLD4DUPq32EvenPseudo: in getOperandLatency()
4680 case ARM::VLD4DUPq32OddPseudo: in getOperandLatency()
4681 case ARM::VLD1LNq8Pseudo: in getOperandLatency()
4682 case ARM::VLD1LNq16Pseudo: in getOperandLatency()
4683 case ARM::VLD1LNq32Pseudo: in getOperandLatency()
4684 case ARM::VLD1LNq8Pseudo_UPD: in getOperandLatency()
4685 case ARM::VLD1LNq16Pseudo_UPD: in getOperandLatency()
4686 case ARM::VLD1LNq32Pseudo_UPD: in getOperandLatency()
4687 case ARM::VLD2LNd8Pseudo: in getOperandLatency()
4688 case ARM::VLD2LNd16Pseudo: in getOperandLatency()
4689 case ARM::VLD2LNd32Pseudo: in getOperandLatency()
4690 case ARM::VLD2LNq16Pseudo: in getOperandLatency()
4691 case ARM::VLD2LNq32Pseudo: in getOperandLatency()
4692 case ARM::VLD2LNd8Pseudo_UPD: in getOperandLatency()
4693 case ARM::VLD2LNd16Pseudo_UPD: in getOperandLatency()
4694 case ARM::VLD2LNd32Pseudo_UPD: in getOperandLatency()
4695 case ARM::VLD2LNq16Pseudo_UPD: in getOperandLatency()
4696 case ARM::VLD2LNq32Pseudo_UPD: in getOperandLatency()
4697 case ARM::VLD4LNd8Pseudo: in getOperandLatency()
4698 case ARM::VLD4LNd16Pseudo: in getOperandLatency()
4699 case ARM::VLD4LNd32Pseudo: in getOperandLatency()
4700 case ARM::VLD4LNq16Pseudo: in getOperandLatency()
4701 case ARM::VLD4LNq32Pseudo: in getOperandLatency()
4702 case ARM::VLD4LNd8Pseudo_UPD: in getOperandLatency()
4703 case ARM::VLD4LNd16Pseudo_UPD: in getOperandLatency()
4704 case ARM::VLD4LNd32Pseudo_UPD: in getOperandLatency()
4705 case ARM::VLD4LNq16Pseudo_UPD: in getOperandLatency()
4706 case ARM::VLD4LNq32Pseudo_UPD: in getOperandLatency()
4726 if (MCID.isCall() || (MCID.hasImplicitDefOfPhysReg(ARM::CPSR) && in getPredicationCost()
4749 if (I->getOpcode() != ARM::t2IT) in getInstrLatency()
4756 if (PredCost && (MCID.isCall() || (MCID.hasImplicitDefOfPhysReg(ARM::CPSR) && in getInstrLatency()
4798 case ARM::VLDMQIA: in getInstrLatency()
4799 case ARM::VSTMQIA: in getInstrLatency()
4848 if (MI.getOpcode() == ARM::tMOVr && !Subtarget.hasV6Ops()) { in verifyInstruction()
4850 if (!ARM::hGPRRegClass.contains(MI.getOperand(0).getReg()) && in verifyInstruction()
4851 !ARM::hGPRRegClass.contains(MI.getOperand(1).getReg())) { in verifyInstruction()
4856 if (MI.getOpcode() == ARM::tPUSH || in verifyInstruction()
4857 MI.getOpcode() == ARM::tPOP || in verifyInstruction()
4858 MI.getOpcode() == ARM::tPOP_RET) { in verifyInstruction()
4863 if (Reg < ARM::R0 || Reg > ARM::R7) { in verifyInstruction()
4864 if (!(MI.getOpcode() == ARM::tPUSH && Reg == ARM::LR) && in verifyInstruction()
4865 !(MI.getOpcode() == ARM::tPOP_RET && Reg == ARM::PC)) { in verifyInstruction()
4872 if (MI.getOpcode() == ARM::MVE_VMOV_q_rr) { in verifyInstruction()
4925 if (LoadImmOpc == ARM::MRC || LoadImmOpc == ARM::t2MRC) { in expandLoadStackGuardBase()
4943 unsigned AddOpc = (LoadImmOpc == ARM::MRC) ? ARM::ADDri : ARM::t2ADDri; in expandLoadStackGuardBase()
4968 if (LoadImmOpc == ARM::tMOVi32imm) { // Thumb-1 execute-only in expandLoadStackGuardBase()
4969 Register CPSRSaveReg = ARM::R12; // Use R12 as scratch register in expandLoadStackGuardBase()
4972 BuildMI(MBB, MI, DL, get(ARM::t2MRS_M), CPSRSaveReg) in expandLoadStackGuardBase()
4977 BuildMI(MBB, MI, DL, get(ARM::t2MSR_M)) in expandLoadStackGuardBase()
5048 if (MI.getOpcode() == ARM::VMOVD && !isPredicated(MI)) in getExecutionDomain()
5054 (MI.getOpcode() == ARM::VMOVRS || MI.getOpcode() == ARM::VMOVSR || in getExecutionDomain()
5055 MI.getOpcode() == ARM::VMOVS)) in getExecutionDomain()
5077 unsigned DReg = TRI->getMatchingSuperReg(SReg, ARM::ssub_0, &ARM::DPRRegClass); in getCorrespondingDRegAndLane()
5080 if (DReg != ARM::NoRegister) in getCorrespondingDRegAndLane()
5084 DReg = TRI->getMatchingSuperReg(SReg, ARM::ssub_1, &ARM::DPRRegClass); in getCorrespondingDRegAndLane()
5117 (Lane & 1) ? ARM::ssub_0 : ARM::ssub_1); in getImplicitSPRUseForDPRUse()
5142 case ARM::VMOVD: in setExecutionDomain()
5160 MI.setDesc(get(ARM::VORRd)); in setExecutionDomain()
5166 case ARM::VMOVRS: in setExecutionDomain()
5183 MI.setDesc(get(ARM::VGETLNi32)); in setExecutionDomain()
5193 case ARM::VMOVSR: { in setExecutionDomain()
5213 MI.setDesc(get(ARM::VSETLNi32)); in setExecutionDomain()
5227 case ARM::VMOVS: { in setExecutionDomain()
5249 MI.setDesc(get(ARM::VDUPLN32d)); in setExecutionDomain()
5277 NewMIB = BuildMI(*MI.getParent(), MI, MI.getDebugLoc(), get(ARM::VEXTd32), in setExecutionDomain()
5296 MI.setDesc(get(ARM::VEXTd32)); in setExecutionDomain()
5357 case ARM::VLDRS: in getPartialRegUpdateClearance()
5358 case ARM::FCONSTS: in getPartialRegUpdateClearance()
5359 case ARM::VMOVSR: in getPartialRegUpdateClearance()
5360 case ARM::VMOVv8i8: in getPartialRegUpdateClearance()
5361 case ARM::VMOVv4i16: in getPartialRegUpdateClearance()
5362 case ARM::VMOVv2i32: in getPartialRegUpdateClearance()
5363 case ARM::VMOVv2f32: in getPartialRegUpdateClearance()
5364 case ARM::VMOVv1i64: in getPartialRegUpdateClearance()
5369 case ARM::VLD1LNd32: in getPartialRegUpdateClearance()
5386 } else if (ARM::SPRRegClass.contains(Reg)) { in getPartialRegUpdateClearance()
5388 unsigned DReg = TRI->getMatchingSuperReg(Reg, ARM::ssub_0, in getPartialRegUpdateClearance()
5389 &ARM::DPRRegClass); in getPartialRegUpdateClearance()
5412 if (ARM::SPRRegClass.contains(Reg)) { in breakPartialRegDependency()
5413 DReg = ARM::D0 + (Reg - ARM::S0) / 2; in breakPartialRegDependency()
5417 assert(ARM::DPRRegClass.contains(DReg) && "Can only break D-reg deps"); in breakPartialRegDependency()
5428 BuildMI(*MI.getParent(), MI, MI.getDebugLoc(), get(ARM::FCONSTD), DReg) in breakPartialRegDependency()
5435 return Subtarget.hasFeature(ARM::HasV6KOps); in hasNOP()
5459 case ARM::VMOVDRR: in getRegSequenceLikeInputs()
5468 MOReg->getSubReg(), ARM::ssub_0)); in getRegSequenceLikeInputs()
5473 MOReg->getSubReg(), ARM::ssub_1)); in getRegSequenceLikeInputs()
5486 case ARM::VMOVRRD: in getExtractSubregLikeInputs()
5496 InputReg.SubIdx = DefIdx == 0 ? ARM::ssub_0 : ARM::ssub_1; in getExtractSubregLikeInputs()
5509 case ARM::VSETLNi32: in getInsertSubregLikeInputs()
5510 case ARM::MVE_VMOV_to_lane_32: in getInsertSubregLikeInputs()
5523 InsertedReg.SubIdx = ARM::ssub_0 + MOIndex.getImm(); in getInsertSubregLikeInputs()
5540 {MO_LO16, "arm-lo16"}, {MO_HI16, "arm-hi16"}, in getSerializableDirectMachineOperandTargetFlags()
5541 {MO_LO_0_7, "arm-lo-0-7"}, {MO_HI_0_7, "arm-hi-0-7"}, in getSerializableDirectMachineOperandTargetFlags()
5542 {MO_LO_8_15, "arm-lo-8-15"}, {MO_HI_8_15, "arm-hi-8-15"}, in getSerializableDirectMachineOperandTargetFlags()
5552 {MO_COFFSTUB, "arm-coffstub"}, in getSerializableBitmaskMachineOperandTargetFlags()
5553 {MO_GOT, "arm-got"}, in getSerializableBitmaskMachineOperandTargetFlags()
5554 {MO_SBREL, "arm-sbrel"}, in getSerializableBitmaskMachineOperandTargetFlags()
5555 {MO_DLLIMPORT, "arm-dllimport"}, in getSerializableBitmaskMachineOperandTargetFlags()
5556 {MO_SECREL, "arm-secrel"}, in getSerializableBitmaskMachineOperandTargetFlags()
5557 {MO_NONLAZY, "arm-nonlazy"}}; in getSerializableBitmaskMachineOperandTargetFlags()
5574 if (Opcode == ARM::SUBri) in isAddImmediate()
5576 else if (Opcode != ARM::ADDri) in isAddImmediate()
5607 if (CmpMI->modifiesRegister(ARM::CPSR, TRI)) in findCMPToFoldIntoCBZ()
5609 if (CmpMI->readsRegister(ARM::CPSR, TRI)) in findCMPToFoldIntoCBZ()
5615 if (CmpMI->getOpcode() != ARM::tCMPi8 && CmpMI->getOpcode() != ARM::t2CMPri) in findCMPToFoldIntoCBZ()
5694 /// | | Thumb2 | ARM |
5714 /// | | Thumb2 | ARM |
5734 /// | | Thumb2 | ARM |
5755 /// | | Thumb2 | ARM |
5774 /// | | Thumb2 | ARM |
5832 for (Register Reg : ARM::rGPRRegClass) { in findRegisterToSaveLRTo()
5834 Reg != ARM::LR && // LR is not reserved, but don't use it. in findRegisterToSaveLRTo()
5835 Reg != ARM::R12 && // R12 is not guaranteed to be preserved. in findRegisterToSaveLRTo()
5855 if (MI.modifiesRegister(ARM::LR, &TRI)) in isLRAvailable()
5860 if (Opcode == ARM::BX_RET || Opcode == ARM::MOVPCLR || in isLRAvailable()
5861 Opcode == ARM::SUBS_PC_LR || Opcode == ARM::tBX_RET || in isLRAvailable()
5862 Opcode == ARM::tBXNS_RET) { in isLRAvailable()
5868 if (MI.readsRegister(ARM::LR, &TRI)) in isLRAvailable()
5889 // According to the ARM Procedure Call Standard, the following are in getOutliningCandidateInfo()
5906 return C.isAnyUnavailableAcrossOrOutOfSeq({ARM::R12, ARM::CPSR}, TRI); in getOutliningCandidateInfo()
6003 } else if (LastInstrOpcode == ARM::BL || LastInstrOpcode == ARM::BLX || in getOutliningCandidateInfo()
6004 LastInstrOpcode == ARM::BLX_noip || LastInstrOpcode == ARM::tBL || in getOutliningCandidateInfo()
6005 LastInstrOpcode == ARM::tBLXr || in getOutliningCandidateInfo()
6006 LastInstrOpcode == ARM::tBLXr_noip || in getOutliningCandidateInfo()
6007 LastInstrOpcode == ARM::tBLXi) { in getOutliningCandidateInfo()
6026 : C.isAvailableAcrossAndOutOfSeq(ARM::LR, TRI); in getOutliningCandidateInfo()
6045 else if (C.isAvailableInsideSeq(ARM::SP, TRI)) { in getOutliningCandidateInfo()
6097 int SPIdx = MI->findRegisterUseOperandIdx(ARM::SP, /*TRI=*/nullptr); in checkAndUpdateStackOffset()
6245 bool R12AvailableInBlock = LRU.available(ARM::R12); in isMBBSafeToOutlineFrom()
6246 bool CPSRAvailableInBlock = LRU.available(ARM::CPSR); in isMBBSafeToOutlineFrom()
6258 if (R12AvailableInBlock && !LRU.available(ARM::R12)) in isMBBSafeToOutlineFrom()
6260 if (CPSRAvailableInBlock && !LRU.available(ARM::CPSR)) in isMBBSafeToOutlineFrom()
6273 : LRU.available(ARM::LR); in isMBBSafeToOutlineFrom()
6289 if (Opc == ARM::tPICADD || Opc == ARM::PICADD || Opc == ARM::PICSTR || in getOutliningTypeImpl()
6290 Opc == ARM::PICSTRB || Opc == ARM::PICSTRH || Opc == ARM::PICLDR || in getOutliningTypeImpl()
6291 Opc == ARM::PICLDRB || Opc == ARM::PICLDRH || Opc == ARM::PICLDRSB || in getOutliningTypeImpl()
6292 Opc == ARM::PICLDRSH || Opc == ARM::t2LDRpci_pic || in getOutliningTypeImpl()
6293 Opc == ARM::t2MOVi16_ga_pcrel || Opc == ARM::t2MOVTi16_ga_pcrel || in getOutliningTypeImpl()
6294 Opc == ARM::t2MOV_ga_pcrel) in getOutliningTypeImpl()
6298 if (Opc == ARM::t2BF_LabelPseudo || Opc == ARM::t2DoLoopStart || in getOutliningTypeImpl()
6299 Opc == ARM::t2DoLoopStartTP || Opc == ARM::t2WhileLoopStart || in getOutliningTypeImpl()
6300 Opc == ARM::t2WhileLoopStartLR || Opc == ARM::t2WhileLoopStartTP || in getOutliningTypeImpl()
6301 Opc == ARM::t2LoopDec || Opc == ARM::t2LoopEnd || in getOutliningTypeImpl()
6302 Opc == ARM::t2LoopEndDec) in getOutliningTypeImpl()
6317 if (MI.readsRegister(ARM::LR, TRI) || MI.readsRegister(ARM::PC, TRI)) in getOutliningTypeImpl()
6343 if (Opc == ARM::BL || Opc == ARM::tBL || Opc == ARM::BLX || in getOutliningTypeImpl()
6344 Opc == ARM::BLX_noip || Opc == ARM::tBLXr || Opc == ARM::tBLXr_noip || in getOutliningTypeImpl()
6345 Opc == ARM::tBLXi) in getOutliningTypeImpl()
6374 if (MI.modifiesRegister(ARM::LR, TRI) || MI.modifiesRegister(ARM::PC, TRI)) in getOutliningTypeImpl()
6378 if (MI.modifiesRegister(ARM::SP, TRI) || MI.readsRegister(ARM::SP, TRI)) { in getOutliningTypeImpl()
6401 if (MI.modifiesRegister(ARM::SP, TRI)) in getOutliningTypeImpl()
6415 if (MI.readsRegister(ARM::ITSTATE, TRI) || in getOutliningTypeImpl()
6416 MI.modifiesRegister(ARM::ITSTATE, TRI)) in getOutliningTypeImpl()
6442 BuildMI(MBB, It, DebugLoc(), get(ARM::t2PAC)).setMIFlags(MIFlags); in saveLROnStack()
6443 BuildMI(MBB, It, DebugLoc(), get(ARM::t2STRD_PRE), ARM::SP) in saveLROnStack()
6444 .addReg(ARM::R12, RegState::Kill) in saveLROnStack()
6445 .addReg(ARM::LR, RegState::Kill) in saveLROnStack()
6446 .addReg(ARM::SP) in saveLROnStack()
6451 unsigned Opc = Subtarget.isThumb() ? ARM::t2STR_PRE : ARM::STR_PRE_IMM; in saveLROnStack()
6452 BuildMI(MBB, It, DebugLoc(), get(Opc), ARM::SP) in saveLROnStack()
6453 .addReg(ARM::LR, RegState::Kill) in saveLROnStack()
6454 .addReg(ARM::SP) in saveLROnStack()
6468 BuildMI(MBB, It, DebugLoc(), get(ARM::CFI_INSTRUCTION)) in saveLROnStack()
6476 unsigned DwarfLR = MRI->getDwarfRegNum(ARM::LR, true); in saveLROnStack()
6479 BuildMI(MBB, It, DebugLoc(), get(ARM::CFI_INSTRUCTION)) in saveLROnStack()
6484 unsigned DwarfRAC = MRI->getDwarfRegNum(ARM::RA_AUTH_CODE, true); in saveLROnStack()
6487 BuildMI(MBB, It, DebugLoc(), get(ARM::CFI_INSTRUCTION)) in saveLROnStack()
6498 unsigned DwarfLR = MRI->getDwarfRegNum(ARM::LR, true); in emitCFIForLRSaveToReg()
6503 BuildMI(MBB, It, DebugLoc(), get(ARM::CFI_INSTRUCTION)) in emitCFIForLRSaveToReg()
6516 BuildMI(MBB, It, DebugLoc(), get(ARM::t2LDRD_POST)) in restoreLRFromStack()
6517 .addReg(ARM::R12, RegState::Define) in restoreLRFromStack()
6518 .addReg(ARM::LR, RegState::Define) in restoreLRFromStack()
6519 .addReg(ARM::SP, RegState::Define) in restoreLRFromStack()
6520 .addReg(ARM::SP) in restoreLRFromStack()
6526 unsigned Opc = Subtarget.isThumb() ? ARM::t2LDR_POST : ARM::LDR_POST_IMM; in restoreLRFromStack()
6527 MachineInstrBuilder MIB = BuildMI(MBB, It, DebugLoc(), get(Opc), ARM::LR) in restoreLRFromStack()
6528 .addReg(ARM::SP, RegState::Define) in restoreLRFromStack()
6529 .addReg(ARM::SP); in restoreLRFromStack()
6541 unsigned DwarfLR = MRI->getDwarfRegNum(ARM::LR, true); in restoreLRFromStack()
6544 BuildMI(MBB, It, DebugLoc(), get(ARM::CFI_INSTRUCTION)) in restoreLRFromStack()
6551 BuildMI(MBB, It, DebugLoc(), get(ARM::CFI_INSTRUCTION)) in restoreLRFromStack()
6556 unsigned DwarfRAC = MRI->getDwarfRegNum(ARM::RA_AUTH_CODE, true); in restoreLRFromStack()
6559 BuildMI(MBB, It, DebugLoc(), get(ARM::CFI_INSTRUCTION)) in restoreLRFromStack()
6566 BuildMI(MBB, It, DebugLoc(), get(ARM::t2AUT)); in restoreLRFromStack()
6573 unsigned DwarfLR = MRI->getDwarfRegNum(ARM::LR, true); in emitCFIForLRRestoreFromReg()
6577 BuildMI(MBB, It, DebugLoc(), get(ARM::CFI_INSTRUCTION)) in emitCFIForLRRestoreFromReg()
6592 ? isThumb ? ARM::tTAILJMPr : ARM::TAILJMPr in buildOutlinedFrame()
6593 : isThumb ? Subtarget.isTargetMachO() ? ARM::tTAILJMPd in buildOutlinedFrame()
6594 : ARM::tTAILJMPdND in buildOutlinedFrame()
6595 : ARM::TAILJMPd; in buildOutlinedFrame()
6618 if (!MBB.isLiveIn(ARM::LR)) in buildOutlinedFrame()
6619 MBB.addLiveIn(ARM::LR); in buildOutlinedFrame()
6670 ? Subtarget.isTargetMachO() ? ARM::tTAILJMPd : ARM::tTAILJMPdND in insertOutlinedCall()
6671 : ARM::TAILJMPd; in insertOutlinedCall()
6681 Opc = isThumb ? ARM::tBL : ARM::BL; in insertOutlinedCall()
6701 copyPhysReg(MBB, It, DebugLoc(), Reg, ARM::LR, true); in insertOutlinedCall()
6705 copyPhysReg(MBB, It, DebugLoc(), ARM::LR, Reg, true); in insertOutlinedCall()
6712 if (!MBB.isLiveIn(ARM::LR)) in insertOutlinedCall()
6713 MBB.addLiveIn(ARM::LR); in insertOutlinedCall()
6738 return (MF.getSubtarget<ARMSubtarget>().hardenSlsBlr()) ? ARM::BLX_noip in getBLXOpcode()
6739 : ARM::BLX; in getBLXOpcode()
6743 return (MF.getSubtarget<ARMSubtarget>().hardenSlsBlr()) ? ARM::tBLXr_noip in gettBLXrOpcode()
6744 : ARM::tBLXr; in gettBLXrOpcode()
6748 return (MF.getSubtarget<ARMSubtarget>().hardenSlsBlr()) ? ARM::BLX_pred_noip in getBLXpredOpcode()
6749 : ARM::BLX_pred; in getBLXpredOpcode()
6807 } else if (EndLoop->getOpcode() == ARM::t2LoopEnd) { in createTripCountGreaterCondition()
6812 if (I.getOpcode() == ARM::t2LoopDec) in createTripCountGreaterCondition()
6816 BuildMI(&MBB, LoopDec->getDebugLoc(), TII->get(ARM::t2CMPri)) in createTripCountGreaterCondition()
6820 .addReg(ARM::NoRegister); in createTripCountGreaterCondition()
6822 Cond.push_back(MachineOperand::CreateReg(ARM::CPSR, false)); in createTripCountGreaterCondition()
6982 if (I != LoopBB->end() && I->getOpcode() == ARM::t2Bcc) { in analyzeLoopForPipelining()
7009 if (I != LoopBB->end() && I->getOpcode() == ARM::t2LoopEnd) { in analyzeLoopForPipelining()
7018 if (!LoopDec || LoopDec->getOpcode() != ARM::t2LoopDec) in analyzeLoopForPipelining()
7022 if (J.getOpcode() == ARM::t2DoLoopStart) in analyzeLoopForPipelining()