cse.c (cse_end_of_basic_block): Don't return the end of a basic block reached by...
authorMark Mitchell <mark@codesourcery.com>
Thu, 21 Oct 1999 03:37:33 +0000 (03:37 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 21 Oct 1999 03:37:33 +0000 (03:37 +0000)
* cse.c (cse_end_of_basic_block): Don't return the end of a basic
block reached by a branch if we're not going to actually process
this block

From-SVN: r30109

gcc/ChangeLog
gcc/cse.c

index 998c4671edfaacee2fcb463cea89b88b3b5e1932..5bfc2710a477c3b961f11f03b0cf2f9d8dee18c1 100644 (file)
@@ -1,3 +1,9 @@
+Wed Oct 20 20:41:46 1999  Mark Mitchell  <mark@codesourcery.com>
+
+       * cse.c (cse_end_of_basic_block): Don't return the end of a basic
+       block reached by a branch if we're not going to actually process
+       this block.
+
 Wed Oct 20 15:18:42 1999  Jim Wilson  <wilson@cygnus.com>
 
        * integrate.c (integrate_decl_tree): Set DECL_CONTEXT to 0 if this is
index edb4678702c86ecba619e35231a0ca436059ddce..a304bc605d5314fd56edcfb552e40128fcac3a1c 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -8442,6 +8442,15 @@ cse_end_of_basic_block (insn, data, follow_jumps, after_loop, skip_blocks)
        path_size--;
     }
 
+  /* If the first instruction is marked with QImode, that means we've
+     already processed this block.  Our caller will look at DATA->LAST
+     to figure out where to go next.  We want to return the next block
+     in the instruction stream, not some branched-to block somewhere
+     else.  We accomplish this by pretending our called forbid us to
+     follow jumps, or skip blocks.  */
+  if (GET_MODE (insn) == QImode)
+    follow_jumps = skip_blocks = 0;
+
   /* Scan to end of this basic block.  */
   while (p && GET_CODE (p) != CODE_LABEL)
     {