aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-15 23:33:09 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-15 23:33:09 +0800
commit1fe32a79cee5cae6dea6fbb1d9f15f7db817a356 (patch)
tree860ec6e0f92fbaf5fb26188daf2d885c84a028b6 /backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp
parent03859a465585d5e9dd256c7a0a2855219dc79ed3 (diff)
downloadrcc-project-1fe32a79cee5cae6dea6fbb1d9f15f7db817a356.tar.gz
rcc-project-1fe32a79cee5cae6dea6fbb1d9f15f7db817a356.tar.xz
[GlobalISel] Clear virtual register types after selection
Diffstat (limited to 'backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp')
-rw-r--r--backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp b/backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp
index 15dfdf0..642e26f 100644
--- a/backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp
+++ b/backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp
@@ -326,6 +326,9 @@ Expected<MachinePassResult> InstructionSelect::runImplementation(MachineFunction
if (!RegisterValidation)
return std::unexpected(withErrorContext(RegisterValidation.error(),
"instruction selection produced invalid registers: "));
+ Function.registerInfo().clearAllVirtualRegisterTypes();
+ Result.Changed = true;
+ Result.Changes.add(MachinePassChange::Registers);
Result.Preserved = Result.Changed ? PreservedAnalyses::none() : PreservedAnalyses::all();
return Result;
}