diff options
author | Bernd Schmidt <bernd.schmidt@analog.com> | 2007-04-20 00:08:46 +0000 |
---|---|---|
committer | Bernd Schmidt <bernd.schmidt@analog.com> | 2007-04-20 00:08:46 +0000 |
commit | 2979ba3089e5c9651deba63e56344a8d04975ef8 (patch) | |
tree | 1a9f92d01863134985e5f2555f1256417e710d36 /gcc/reload.c | |
parent | 93dacaf8fbc385165ae74dfddf4d3936018fd8dc (diff) |
* reload.c (combine_reloads): When trying to use a dying register,
check whether it's uninitialized and don't use if so.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@123986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index aa22671c13a..b0374d8c106 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -1853,7 +1853,12 @@ combine_reloads (void) || ! (TEST_HARD_REG_BIT (reg_class_contents[(int) rld[secondary_out].class], REGNO (XEXP (note, 0))))))) - && ! fixed_regs[REGNO (XEXP (note, 0))]) + && ! fixed_regs[REGNO (XEXP (note, 0))] + /* Check that we don't use a hardreg for an uninitialized + pseudo. See also find_dummy_reload(). */ + && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER + || ! bitmap_bit_p (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end, + ORIGINAL_REGNO (XEXP (note, 0))))) { rld[output_reload].reg_rtx = gen_rtx_REG (rld[output_reload].outmode, |