From 15a47f437d2ba320aa9cb72986812f115498dbf9 Mon Sep 17 00:00:00 2001 From: "Vladimir N. Makarov" Date: Wed, 6 Jan 2021 14:48:53 -0500 Subject: [PR97978] LRA: Permit temporary allocation incorrectness after hard reg split. LRA can crash when a hard register was split and the same hard register was assigned on the previous assignment sub-pass. The following patch fixes this problem. gcc/ChangeLog: PR rtl-optimization/97978 * lra-int.h (lra_hard_reg_split_p): New external. * lra.c (lra_hard_reg_split_p): New global. (lra): Set up lra_hard_reg_split_p after splitting a hard reg. * lra-assigns.c (lra_assign): Don't check allocation correctness after hard reg splitting. gcc/testsuite/ChangeLog: PR rtl-optimization/97978 * gcc.target/i386/pr97978.c: New. --- gcc/lra-int.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/lra-int.h') diff --git a/gcc/lra-int.h b/gcc/lra-int.h index 75ba656..1b8f7b6 100644 --- a/gcc/lra-int.h +++ b/gcc/lra-int.h @@ -273,6 +273,7 @@ typedef class lra_insn_recog_data *lra_insn_recog_data_t; extern FILE *lra_dump_file; +extern bool lra_hard_reg_split_p; extern bool lra_asm_error_p; extern bool lra_reg_spill_p; -- cgit v1.1