diff options
| author | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-07 01:27:41 +0800 |
|---|---|---|
| committer | Richard-Qin-X <richard.qin.001@gmail.com> | 2026-08-07 01:27:41 +0800 |
| commit | 76d89700953ddd81cf31ab8f260eddf67e93aa85 (patch) | |
| tree | c96a453164154b2d1559cea36910df52103f0f19 /backend/unittests/CodeGen/MachineFunctionClonerTest.cpp | |
| parent | 183e2354e9fdd107be420cbb185c1d239434aa48 (diff) | |
| download | rcc-project-76d89700953ddd81cf31ab8f260eddf67e93aa85.tar.gz rcc-project-76d89700953ddd81cf31ab8f260eddf67e93aa85.tar.xz | |
[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.
Diffstat (limited to 'backend/unittests/CodeGen/MachineFunctionClonerTest.cpp')
| -rw-r--r-- | backend/unittests/CodeGen/MachineFunctionClonerTest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<std::byte>(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}; |
