OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / gimple-iterator.c
index a52c830..876225b 100644 (file)
@@ -604,7 +604,7 @@ gsi_insert_seq_on_edge (edge e, gimple_seq seq)
 
    In all cases, the returned *GSI points to the correct location.  The
    return value is true if insertion should be done after the location,
-   or false if it should be done before the location.  If new basic block
+   or false if it should be done before the location.  If new basic block
    has to be created, it is stored in *NEW_BB.  */
 
 static bool
@@ -623,9 +623,9 @@ gimple_find_edge_insert_loc (edge e, gimple_stmt_iterator *gsi,
      would have to examine the PHIs to prove that none of them used
      the value set by the statement we want to insert on E.  That
      hardly seems worth the effort.  */
-restart:
+ restart:
   if (single_pred_p (dest)
-      && ! phi_nodes (dest)
+      && gimple_seq_empty_p (phi_nodes (dest))
       && dest != EXIT_BLOCK_PTR)
     {
       *gsi = gsi_start_bb (dest);
@@ -667,10 +667,13 @@ restart:
       if (!stmt_ends_bb_p (tmp))
        return true;
 
-      if (gimple_code (tmp) == GIMPLE_RETURN)
-        {
-         gsi_prev (gsi);
-         return true;
+      switch (gimple_code (tmp))
+       {
+       case GIMPLE_RETURN:
+       case GIMPLE_RESX:
+         return false;
+       default:
+         break;
         }
     }