llvm.org GIT mirror llvm / 19988dd
[CodeGen][NFC] Correct case for printSubRegIdx git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322541 91177308-0d34-0410-b5e6-96231b3b80d8 Francis Visoiu Mistrih 2 years ago
5 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
237237 /// MO_Immediate operands can also be subreg idices. If it's the case, the
238238 /// subreg index name will be printed. MachineInstr::isOperandSubregIdx can be
239239 /// called to check this.
240 static void printSubregIdx(raw_ostream &OS, uint64_t Index,
240 static void printSubRegIdx(raw_ostream &OS, uint64_t Index,
241241 const TargetRegisterInfo *TRI);
242242
243243 /// Print operand target flags.
743743 case MachineOperand::MO_Immediate:
744744 if (MI.isOperandSubregIdx(OpIdx)) {
745745 MachineOperand::printTargetFlags(OS, Op);
746 MachineOperand::printSubregIdx(OS, Op.getImm(), TRI);
746 MachineOperand::printSubRegIdx(OS, Op.getImm(), TRI);
747747 break;
748748 }
749749 LLVM_FALLTHROUGH;
13961396 LLT TypeToPrint = MRI ? getTypeToPrint(i, PrintedTypes, *MRI) : LLT{};
13971397 unsigned TiedOperandIdx = getTiedOperandIdx(i);
13981398 if (MO.isImm() && isOperandSubregIdx(i))
1399 MachineOperand::printSubregIdx(OS, MO.getImm(), TRI);
1399 MachineOperand::printSubRegIdx(OS, MO.getImm(), TRI);
14001400 else
14011401 MO.print(OS, MST, TypeToPrint, /*PrintDef=*/true,
14021402 ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo);
439439 OS << "";
440440 }
441441
442 void MachineOperand::printSubregIdx(raw_ostream &OS, uint64_t Index,
442 void MachineOperand::printSubRegIdx(raw_ostream &OS, uint64_t Index,
443443 const TargetRegisterInfo *TRI) {
444444 OS << "%subreg.";
445445 if (TRI)
118118 std::string str;
119119 raw_string_ostream OS(str);
120120 ModuleSlotTracker DummyMST(nullptr);
121 MachineOperand::printSubregIdx(OS, MO.getImm(), nullptr);
121 MachineOperand::printSubRegIdx(OS, MO.getImm(), nullptr);
122122 ASSERT_TRUE(OS.str() == "%subreg.3");
123123 }
124124