>From 0d63cdbf3e0625d46aae79bd83217194a81c4945 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Tue, 15 Jun 2010 11:19:29 -0700 Subject: [PATCH 4/9] Set pseudos only once --- gcc/gcse.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/gcse.c b/gcc/gcse.c index 74986a4..45cab70 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -4437,8 +4437,13 @@ hoist_code (void) /* Create a pseudo-reg to store the result of reaching expressions into. Get the mode for the new pseudo - from the mode of the original destination pseudo. */ - if (expr->reaching_reg == NULL) + from the mode of the original destination pseudo. + + It is important to use new pseudos whenever we + emit a set for it in insert_insn_end_basic below. + This will allow reload to use equivalence for + registers that are set only once. */ + if (!insn_inserted_p) expr->reaching_reg = gen_reg_rtx_and_attrs (SET_DEST (set)); -- 1.6.2.4