combine.c (combine_instructions): When finished, call init_recog.
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Wed, 14 Oct 1998 20:50:40 +0000 (14:50 -0600)
committerJeff Law <law@gcc.gnu.org>
Wed, 14 Oct 1998 20:50:40 +0000 (14:50 -0600)
8
* combine.c (combine_instructions): When finished, call init_recog.
* regmove.c (optimize_reg_copy_3): Reject volatile MEMs.

From-SVN: r23094

gcc/combine.c
gcc/regmove.c

index 619c897f81169e09260e54eb3c635d366949cb04..f355abc0600a24994e5b3bb078e028df22d0c663 100644 (file)
@@ -674,6 +674,9 @@ combine_instructions (f, nregs)
   total_successes += combine_successes;
 
   nonzero_sign_valid = 0;
+
+  /* Make recognizer allow volatile MEMs again.  */
+  init_recog ();
 }
 
 /* Wipe the reg_last_xxx arrays in preparation for another pass.  */
index 35ddf12d6f3917bd8a33eaaaef53eaa9aaacb4f9..55dd3f352c3b984584ab5a0fcbf4a4ea790d666c 100644 (file)
@@ -553,6 +553,11 @@ optimize_reg_copy_3 (insn, dest, src)
       || SET_DEST (set) != src_reg)
     return;
 
+  /* Be conserative: although this optimization is also valid for
+     volatile memory references, that could cause trouble in later passes.  */
+  if (MEM_VOLATILE_P (SET_SRC (set)))
+    return;
+
   /* Do not use a SUBREG to truncate from one mode to another if truncation
      is not a nop.  */
   if (GET_MODE_BITSIZE (GET_MODE (src_reg)) <= GET_MODE_BITSIZE (GET_MODE (src))