From aa69e15c6909c3b162b15f5326f0a72ba9bb7163 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Thu, 13 Aug 2026 23:55:38 +0800 Subject: [CodeGen] Unify scalar low-level types --- backend/unittests/Target/RISCVRegisterAllocationTest.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'backend/unittests/Target/RISCVRegisterAllocationTest.cpp') diff --git a/backend/unittests/Target/RISCVRegisterAllocationTest.cpp b/backend/unittests/Target/RISCVRegisterAllocationTest.cpp index 6daf58a..29bc756 100644 --- a/backend/unittests/Target/RISCVRegisterAllocationTest.cpp +++ b/backend/unittests/Target/RISCVRegisterAllocationTest.cpp @@ -84,7 +84,8 @@ struct FunctionFixture final { return FunctionFixture{std::move(*Function), *Block}; } -[[nodiscard]] rcc::Expected createVReg(rcc::MachineFunction &Function, rcc::LLT Type, +[[nodiscard]] rcc::Expected createVReg(rcc::MachineFunction &Function, + rcc::LowLevelType Type, rcc::riscv::RegisterBank Bank, rcc::riscv::RegisterClass Class) { auto Reg = Function.registerInfo().createVirtualRegister(Type); @@ -304,7 +305,7 @@ void testTargetHooks(TestContext &Context, const rcc::TargetDescription &Target) void testRematerialization(TestContext &Context, const rcc::TargetDescription &Target) { auto Fixture = createFunction("riscv-rematerialization", 2); - auto I64 = rcc::LLT::makeInteger(64); + auto I64 = rcc::LowLevelType::makeCategoryNeutralScalar(64); if (!Fixture || !I64) return; auto Original = createVReg(*Fixture->Function, *I64, rcc::riscv::RegisterBank::GPR, @@ -335,7 +336,7 @@ void testRematerialization(TestContext &Context, const rcc::TargetDescription &T [[nodiscard]] rcc::Expected createSimpleAllocationFunction(const rcc::TargetDescription &Target, std::uint64_t ID) { auto Fixture = createFunction("riscv-ra-" + std::to_string(ID), ID); - auto I64 = rcc::LLT::makeInteger(64); + auto I64 = rcc::LowLevelType::makeCategoryNeutralScalar(64); if (!Fixture) return std::unexpected(Fixture.error()); if (!I64) @@ -448,7 +449,7 @@ void testFunctionReservedRegisters(TestContext &Context, const rcc::TargetDescri [[nodiscard]] rcc::Expected createPressureFunction(const rcc::TargetDescription &Target, std::uint64_t ID) { auto Fixture = createFunction("riscv-pressure-" + std::to_string(ID), ID); - auto I64 = rcc::LLT::makeInteger(64); + auto I64 = rcc::LowLevelType::makeCategoryNeutralScalar(64); if (!Fixture) return std::unexpected(Fixture.error()); if (!I64) -- cgit v1.2.3