From: Maxim Kuvyrkov Date: Tue, 27 Jul 2010 19:36:31 +0000 (+0000) Subject: * gcse.c (hoist_code): Generate new pseudo for every new set insn. X-Git-Tag: releases/gcc-4.6.0~5385 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d489bc712a95777f917e16ae38a8e78935d6f11;p=thirdparty%2Fgcc.git * gcse.c (hoist_code): Generate new pseudo for every new set insn. From-SVN: r162591 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d39fbfca76f1..36c9a1b571ec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2010-07-27 Maxim Kuvyrkov + + * gcse.c (hoist_code): Generate new pseudo for every new set insn. + 2010-07-27 Maxim Kuvyrkov PR rtl-optimization/40956 diff --git a/gcc/gcse.c b/gcc/gcse.c index 4b2547c33670..812cc0a888d7 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -4581,8 +4581,12 @@ 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. This will allow reload to use + rematerialization for such registers. */ + if (!insn_inserted_p) expr->reaching_reg = gen_reg_rtx_and_attrs (SET_DEST (set));