From 8b797159e6c8fe1294fd2d26de3bd0992c61ea24 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Tue, 11 Aug 2026 19:54:56 +0800 Subject: [RISCV] Use canonical copies for full ABI values --- backend/unittests/Target/RISCVCallLoweringTest.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'backend/unittests/Target') diff --git a/backend/unittests/Target/RISCVCallLoweringTest.cpp b/backend/unittests/Target/RISCVCallLoweringTest.cpp index 514c277..d3685ae 100644 --- a/backend/unittests/Target/RISCVCallLoweringTest.cpp +++ b/backend/unittests/Target/RISCVCallLoweringTest.cpp @@ -2,6 +2,7 @@ #include "rcc/Target/RISCV/RISCVCallLowering.h" +#include "rcc/CodeGen/GenericOpcodes.h" #include "rcc/CodeGen/MachineBasicBlock.h" #include "rcc/CodeGen/MachineFrameInfo.h" #include "rcc/CodeGen/MachineFunction.h" @@ -486,15 +487,16 @@ void testOrdinaryAndIndirectEmission(TestContext &Context) { Context.expect(Instructions.size() == 5 && Instructions.front()->opcode() == opcode(rcc::riscv::InstructionOpcode::ADJCALLSTACKDOWN) && - Instructions.back()->opcode() == - opcode(rcc::riscv::InstructionOpcode::PseudoCC_COPY) && + Instructions[1]->opcode() == rcc::opcode(rcc::GenericOpcode::COPY) && + Instructions.back()->opcode() == rcc::opcode(rcc::GenericOpcode::COPY) && Call != nullptr && Call->operandCount() >= 6 && Call->operandAt(0)->kind() == rcc::MachineOperand::Kind::ExternalSymbol && Call->operandAt(0)->targetFlags() == static_cast(rcc::riscv::CallTargetFlag::DirectCall) && Call->operandAt(1)->kind() == rcc::MachineOperand::Kind::IntegerImmediate && Call->operandAt(2)->kind() == rcc::MachineOperand::Kind::RegisterMask, - "ordinary emission must materialize call-frame, copies, target, ID, and RegMask"); + "ordinary emission must materialize canonical full-value copies, call-frame, " + "target, ID, and RegMask"); bool HasArgumentUse = false; bool HasResultDef = false; for (const rcc::MachineOperand &Operand : Call->operands()) { -- cgit v1.2.3