aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/GlobalISel/InstructionSelect.cpp
diff options
context:
space:
mode:
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;
}