amdgcn: Fix ICE generating CFI [PR103396]

gcc/ChangeLog:

	PR target/103396
	* config/gcn/gcn.c (move_callee_saved_registers): Ensure that the
	number of spilled registers is counted correctly.
This commit is contained in:
Andrew Stubbs 2021-11-25 15:59:20 +00:00
parent 1598bd47b2
commit 58d50a5dd6

View File

@ -2785,7 +2785,7 @@ move_callee_saved_registers (rtx sp, machine_function *offsets,
int start = (regno == VGPR_REGNO (7) ? 64 : 0);
int count = MIN (saved_scalars - start, 64);
int add_lr = (regno == VGPR_REGNO (6)
&& df_regs_ever_live_p (LINK_REGNUM));
&& offsets->lr_needs_saving);
int lrdest = -1;
rtvec seq = rtvec_alloc (count + add_lr);