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/RISCVSSAExitTest.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'backend/unittests/Target/RISCVSSAExitTest.cpp') diff --git a/backend/unittests/Target/RISCVSSAExitTest.cpp b/backend/unittests/Target/RISCVSSAExitTest.cpp index 54a5911..1912666 100644 --- a/backend/unittests/Target/RISCVSSAExitTest.cpp +++ b/backend/unittests/Target/RISCVSSAExitTest.cpp @@ -54,7 +54,8 @@ private: return rcc::RegisterClassID::fromValue(static_cast(Class)); } -[[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); @@ -219,9 +220,9 @@ void testBehaviorAndCopyLegality(TestContext &Context, const rcc::TargetDescript Context.expect(Rewritten && *Rewritten && blockOperand(*Jump, 1)->Block == *Third, "RV64GC branch target rewriting must update direct JAL operands"); - auto I64 = rcc::LLT::makeInteger(64); - auto F64 = rcc::LLT::makeFloat(rcc::FloatSemantics::IEEEDouble); - auto F32 = rcc::LLT::makeFloat(rcc::FloatSemantics::IEEESingle); + auto I64 = rcc::LowLevelType::makeCategoryNeutralScalar(64); + auto F64 = rcc::LowLevelType::makeCategoryNeutralScalar(64); + auto F32 = rcc::LowLevelType::makeCategoryNeutralScalar(32); if (!I64 || !F64 || !F32) return; auto GPR = @@ -318,7 +319,7 @@ void testRV64GCCriticalEdge(TestContext &Context, const rcc::TargetDescription & auto Merge = appendBlock(**Function); if (!From || !Side || !Other || !Merge) return; - auto I64 = rcc::LLT::makeInteger(64); + auto I64 = rcc::LowLevelType::makeCategoryNeutralScalar(64); auto X0 = rcc::riscv::physicalRegister(rcc::riscv::PhysicalRegisterID::X0); if (!I64 || !X0) return; -- cgit v1.2.3