File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -977,6 +977,10 @@ bool create_encode_function(llvm::MachineFunction *func,
977977 auto &mach_reg_info = func->getRegInfo ();
978978 // const auto &target_reg_info = func->getSubtarget().getRegisterInfo();
979979
980+ // Mark return registers as used.
981+ for (auto reg_id : state.return_regs ) {
982+ state.used_regs .insert (reg_id);
983+ }
980984
981985 // map inputs
982986 {
@@ -989,7 +993,6 @@ bool create_encode_function(llvm::MachineFunction *func,
989993 state.param_names .push_back (std::move (name));
990994
991995 const auto reg_id = target->reg_id_from_mc_reg (it->first );
992- assert (!state.used_regs .contains (reg_id));
993996 state.used_regs .insert (reg_id);
994997 state.asm_operand_refs [reg_id] = state.param_names [idx++];
995998 state.operand_ref_counts [state.param_names .back ()] = 1 ;
You can’t perform that action at this time.
0 commit comments