From 925e86094f7ee4aa04dd04cd04f7deb2348b392f Mon Sep 17 00:00:00 2001 From: steven Date: Mon, 12 Nov 2012 20:21:59 +0000 Subject: gcc/ PR rtl-optimization/51447 * df-scan.c (df_get_entry_block_def_set): Add global regs to the set. * df-problems.c (df_lr_local_compute): Make global regs always live. * dce.c (deletable_insn_p): Make insns setting a global reg inherently necessary. testsuite/ PR rtl-optimization/51447 * gcc.c-torture/execute/pr51447.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193453 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/df-scan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/df-scan.c') diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 23da115f178..566f2375be5 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -3790,8 +3790,12 @@ df_get_entry_block_def_set (bitmap entry_block_defs) bitmap_clear (entry_block_defs); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (FUNCTION_ARG_REGNO_P (i)) - bitmap_set_bit (entry_block_defs, INCOMING_REGNO (i)); + { + if (global_regs[i]) + bitmap_set_bit (entry_block_defs, i); + if (FUNCTION_ARG_REGNO_P (i)) + bitmap_set_bit (entry_block_defs, INCOMING_REGNO (i)); + } /* The always important stack pointer. */ bitmap_set_bit (entry_block_defs, STACK_POINTER_REGNUM); -- cgit v1.2.1