From 76d89700953ddd81cf31ab8f260eddf67e93aa85 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Fri, 7 Aug 2026 01:27:41 +0800 Subject: [MIR] Complete document parsing and printing Implement the single LLVM-compatible MIR document path with structured\nembedded-IR references, YAML mappings, constants, and deterministic printing.\n\nKeep pointer LLT widths DataLayout-derived, reject layout-dependent output\nwhen embedded IR is omitted, and record the fixed-baseline compatibility\ncontract and regression coverage. --- backend/unittests/CodeGen/MachineFunctionClonerTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'backend/unittests/CodeGen/MachineFunctionClonerTest.cpp') diff --git a/backend/unittests/CodeGen/MachineFunctionClonerTest.cpp b/backend/unittests/CodeGen/MachineFunctionClonerTest.cpp index 9c8a447..9d8ffd2 100644 --- a/backend/unittests/CodeGen/MachineFunctionClonerTest.cpp +++ b/backend/unittests/CodeGen/MachineFunctionClonerTest.cpp @@ -335,8 +335,9 @@ struct SourceFixture final { return false; rcc::MachineConstantPoolEntryDesc HistoricalConstant; + auto HistoricalInteger = rcc::IntegerImmediate::fromUnsigned(32, 0x01010101U); HistoricalConstant.Value = - rcc::GenericConstantData{"i32", std::vector(4, std::byte{1})}; + std::move(*rcc::GenericConstantData::integer(std::move(*HistoricalInteger))); HistoricalConstant.Size = 4; HistoricalConstant.Align = *rcc::Alignment::create(4); auto HistoricalConstantIndex = Function.constantPool().addEntry(std::move(HistoricalConstant)); @@ -367,7 +368,7 @@ struct SourceFixture final { "source jump table history must contain a tombstone"); rcc::MachineJumpTableDesc JumpTable; - JumpTable.Encoding = rcc::JumpTableEntryEncoding::RelativeToTableBase; + JumpTable.Encoding = rcc::JumpTableEntryEncoding::GPRelative32BlockAddress; JumpTable.EntrySize = 4; JumpTable.Align = *rcc::Alignment::create(4); JumpTable.Targets = {Fixture.Exit, Fixture.Entry, Fixture.Exit}; -- cgit v1.2.3