* gcse.c (hoist_code): Generate new pseudo for every new set insn.
authorMaxim Kuvyrkov <maxim@codesourcery.com>
Tue, 27 Jul 2010 19:36:31 +0000 (19:36 +0000)
committerMaxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>
Tue, 27 Jul 2010 19:36:31 +0000 (19:36 +0000)
From-SVN: r162591

gcc/ChangeLog
gcc/gcse.c

index d39fbfca76f1f7cdd41c278a5e8817a7a48e9547..36c9a1b571ec71e487b8450820ad31e1966d43d7 100644 (file)
@@ -1,3 +1,7 @@
+2010-07-27  Maxim Kuvyrkov  <maxim@codesourcery.com>
+
+       * gcse.c (hoist_code): Generate new pseudo for every new set insn.
+
 2010-07-27  Maxim Kuvyrkov  <maxim@codesourcery.com>
 
        PR rtl-optimization/40956
index 4b2547c33670d1db8dc374d12edab884c88ed33a..812cc0a888d7c93149f6aebe63961bd476ea207c 100644 (file)
@@ -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));