From e7586a115e9ff6ee303c2546cb0eab48bde6dfbb Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Tue, 11 Aug 2026 23:51:07 +0800 Subject: [CodeGen] Accept conservative physical live-ins --- backend/unittests/CodeGen/MachineLivenessTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backend/unittests/CodeGen') diff --git a/backend/unittests/CodeGen/MachineLivenessTest.cpp b/backend/unittests/CodeGen/MachineLivenessTest.cpp index a375e25..3f7621d 100644 --- a/backend/unittests/CodeGen/MachineLivenessTest.cpp +++ b/backend/unittests/CodeGen/MachineLivenessTest.cpp @@ -656,6 +656,12 @@ void testLivenessRebuildAndVerifier(TestContext &Context, const rcc::TargetDescr Context.expect(rcc::MachineVerifier::verify(Function, Target).has_value(), "rebuilt tracked liveness must pass the MachineVerifier"); + auto ConservativeLiveIn = Entry.addLiveIn(physical(rcc::test::TestRegister::F0)); + Context.expect(ConservativeLiveIn.has_value() && + rcc::MachineVerifier::verify(Function, Target).has_value(), + "MachineVerifier must accept conservative physical live-ins"); + Entry.clearLiveIns(); + rcc::MachineOperand *FirstUseOperand = (*FirstUse)->operandAt(0); if (FirstUseOperand == nullptr) { Context.expect(false, "first use operand must exist"); -- cgit v1.2.3