Do not perform pseudo replacements if the loop contains volatile memory
authorNick Clifton <nickc@cygnus.com>
Thu, 18 Mar 1999 15:59:50 +0000 (15:59 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Thu, 18 Mar 1999 15:59:50 +0000 (15:59 +0000)
references.

From-SVN: r25841

gcc/ChangeLog
gcc/loop.c

index e06c403e5ceb4d53edf7bb60697e173db413a5bc..94aedd183d4fe854d20411bf0f9c8a978777eb62 100644 (file)
@@ -1,3 +1,8 @@
+Thu Mar 18 15:58:26 1999  Nick Clifton  <nickc@cygnus.com>
+
+       * loop.c (strength_reduce): Do not perform pseudo replacements
+       if the loop contains volatile memory references.
+
 Thu Mar 18 19:09:50 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * reload.c (find_reloads_toplev): When processing X recursively,
index a2023b22d193c2de0a34244a74f539c595bd0ceb..551bcf6359a7f66d50ed5b4697fe2c1819313c22 100644 (file)
@@ -4115,8 +4115,11 @@ strength_reduce (scan_start, end, loop_top, insn_count,
   first_increment_giv = max_reg_num ();
   for (n_extra_increment = 0, bl = loop_iv_list; bl; bl = bl->next)
     n_extra_increment += bl->biv_count - 1;
+
+  /* If the loop contains volatile memory references do not allow any
+     replacements to take place, since this could loose the volatile markers.  */
   /* XXX Temporary.  */
-  if (0 && n_extra_increment)
+  if (0 && n_extra_increment  && ! loop_has_volatile)
     {
       int nregs = first_increment_giv + n_extra_increment;