* genextract.c (main): Set ro_loc for peepholes.
authorHans-Peter Nilsson <hp@axis.com>
Sat, 24 Nov 2001 22:57:28 +0000 (22:57 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Sat, 24 Nov 2001 22:57:28 +0000 (22:57 +0000)
From-SVN: r47308

gcc/ChangeLog
gcc/genextract.c

index d5ca26c35d9c02e0d551dd2a8bb1f7ebac72f9c1..1043d2d84d124a81627ce235d14654a23d999586 100644 (file)
@@ -1,3 +1,7 @@
+2001-11-24  Hans-Peter Nilsson  <hp@axis.com>
+
+       * genextract.c (main): Set ro_loc for peepholes.
+
 Sat Nov 24 17:04:10 2001  Douglas B. Rupp  <rupp@gnat.com>
 
        * fix-header.c (main): Move inf_buffer termination and inf_limit
index 7c111368c03e3e7cee19760792deeebb17224bba..ae77ac9ba7babbd938776adb6e10d6f8b9e7f55d 100644 (file)
@@ -434,9 +434,11 @@ from the machine description file `md'.  */\n\n");
 
       /* The vector in the insn says how many operands it has.
         And all it contains are operands.  In fact, the vector was
-        created just for the sake of this function.  */
+        created just for the sake of this function.  We need to set the
+        location of the operands for sake of simplifications after
+        extraction, like eliminating subregs.  */
       printf ("      for (i = XVECLEN (pat, 0) - 1; i >= 0; i--)\n");
-      printf ("          ro[i] = XVECEXP (pat, 0, i);\n");
+      printf ("          ro[i] = *(ro_loc[i] = &XVECEXP (pat, 0, i));\n");
       printf ("      break;\n\n");
     }