From 5794302adc3ce94c69318965b1bbef7a895d5d41 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Thu, 13 Aug 2026 18:52:39 +0800 Subject: [CodeGen] Preserve LLT annotations on generic opcodes --- backend/lib/CodeGen/MIRPrinter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'backend/lib/CodeGen/MIRPrinter.cpp') diff --git a/backend/lib/CodeGen/MIRPrinter.cpp b/backend/lib/CodeGen/MIRPrinter.cpp index d8a6945..9008315 100644 --- a/backend/lib/CodeGen/MIRPrinter.cpp +++ b/backend/lib/CodeGen/MIRPrinter.cpp @@ -2,6 +2,7 @@ #include "rcc/CodeGen/MIRPrinter.h" +#include "rcc/CodeGen/GenericOpcodes.h" #include "rcc/CodeGen/InlineAsm.h" #include "rcc/CodeGen/InstructionDescriptor.h" #include "rcc/CodeGen/MIRYamlMapping.h" @@ -2877,8 +2878,8 @@ Expected BodyPrinter::printInstruction(const MachineInstr &Instruction) { continue; } bool PrintVirtualType = true; - if (Descriptor->Flags.has(InstructionFlag::Generic) && - !Descriptor->Flags.has(InstructionFlag::Phi) && Index < Descriptor->Operands.size()) { + if (isGenericOpcode(Instruction.opcode()) && !Descriptor->Flags.has(InstructionFlag::Phi) && + Index < Descriptor->Operands.size()) { const std::optional &UseConstraint = Descriptor->Operands[Index].TypeConstraint; if (UseConstraint) { -- cgit v1.2.3