Fix ia64-linux kernel fn_hash() miscompilation.
authorJim Wilson <wilson@cygnus.com>
Mon, 18 Sep 2000 21:37:37 +0000 (21:37 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 18 Sep 2000 21:37:37 +0000 (14:37 -0700)
* function.c (fixup_var_refs_1, case ZERO_EXTRACT): If we have a
paradoxical subreg, then directly substitute the replacement and
return.

From-SVN: r36515

gcc/ChangeLog
gcc/function.c

index bd55ea688f4a94b53a37202648a88b4b25265d64..da574002f5bf551eb1543f2af9296efd06c2d44d 100644 (file)
@@ -1,3 +1,9 @@
+2000-09-18  Jim Wilson  <wilson@cygnus.com>
+
+       * function.c (fixup_var_refs_1, case ZERO_EXTRACT): If we have a
+       paradoxical subreg, then directly substitute the replacement and
+       return.
+
 Mon 18-Sep-2000 22:12:44 BST  Neil Booth  <NeilB@earthling.net>
 
         * cpp.texi: Update documentation, including some clarifications,
index 969887fe94f6e270cafe73004ccfd6dc82c6aec8..f05711487b64cc4af18e3b7eb7d080e85f15fad4 100644 (file)
@@ -2015,6 +2015,14 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
                  if (replacement->new == 0)
                    replacement->new = gen_reg_rtx (GET_MODE (var));
                  SUBREG_REG (tem) = replacement->new;
+
+                 /* The following code works only if we have a MEM, so we
+                    need to handle the subreg here.  We directly substitute
+                    it assuming that a subreg must be OK here.  We already
+                    scheduled a replacement to copy the mem into the
+                    subreg.  */
+                 XEXP (x, 0) = tem;
+                 return;
                }
              else
                tem = fixup_memory_subreg (tem, insn, 0);