[PATCH] D129870: [AArch64InstPrinter] Introduce register markup tags emission
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 11 01:44:27 PDT 2022
david-arm accepted this revision.
david-arm added a comment.
This revision is now accepted and ready to land.
LGTM!
================
Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp:1447
for (unsigned i = 0; i < NumRegs; ++i, Reg = getNextVectorRegister(Reg)) {
- if (MRI.getRegClass(AArch64::ZPRRegClassID).contains(Reg))
- O << getRegisterName(Reg) << LayoutSuffix;
- else
- O << getRegisterName(Reg, AArch64::vreg) << LayoutSuffix;
+ if (MRI.getRegClass(AArch64::ZPRRegClassID).contains(Reg)) {
+ printRegName(O, Reg);
----------------
nit: You could write this in fewer lines I think with just:
if (MRI.getRegClass(AArch64::ZPRRegClassID).contains(Reg))
printRegName(O, Reg);
else
printRegName(O, Reg, AArch64::vreg);
O << LayoutSuffix;
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129870/new/
https://reviews.llvm.org/D129870
More information about the llvm-commits
mailing list