aboutsummaryrefslogtreecommitdiff
path: root/backend/unittests/CodeGen/MachineLivenessTest.cpp
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-11 23:51:07 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-11 23:51:07 +0800
commite7586a115e9ff6ee303c2546cb0eab48bde6dfbb (patch)
treeec283748737f62542f82079c1a10fc07bec8cc2d /backend/unittests/CodeGen/MachineLivenessTest.cpp
parente6cd1347cc2c76babe56842e1b7bd05d68fe9584 (diff)
downloadrcc-project-e7586a115e9ff6ee303c2546cb0eab48bde6dfbb.tar.gz
rcc-project-e7586a115e9ff6ee303c2546cb0eab48bde6dfbb.tar.xz
[CodeGen] Accept conservative physical live-ins
Diffstat (limited to 'backend/unittests/CodeGen/MachineLivenessTest.cpp')
-rw-r--r--backend/unittests/CodeGen/MachineLivenessTest.cpp6
1 files changed, 6 insertions, 0 deletions
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");