OSDN Git Service

2009-11-04 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / tree-vect-stmts.c
index 0a2ab19..fb4a5bf 100644 (file)
@@ -145,6 +145,9 @@ vect_stmt_relevant_p (gimple stmt, loop_vec_info loop_vinfo,
              if (vect_print_dump_info (REPORT_DETAILS))
                fprintf (vect_dump, "vec_stmt_relevant_p: used out of loop.");
 
+             if (is_gimple_debug (USE_STMT (use_p)))
+               continue;
+
              /* We expect all such uses to be in the loop exit phis
                 (because of loop closed form)   */
              gcc_assert (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI);
@@ -169,13 +172,13 @@ exist_non_indexing_operands_for_use_p (tree use, gimple stmt)
 {
   tree operand;
   stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
+
   /* USE corresponds to some operand in STMT. If there is no data
      reference in STMT, then any operand that corresponds to USE
      is not indexing an array.  */
   if (!STMT_VINFO_DATA_REF (stmt_info))
     return true;
+
   /* STMT has a data_ref. FORNOW this means that its of one of
      the following forms:
      -1- ARRAY_REF = var
@@ -188,14 +191,12 @@ exist_non_indexing_operands_for_use_p (tree use, gimple stmt)
 
      Therefore, all we need to check is if STMT falls into the
      first case, and whether var corresponds to USE.  */
-  if (TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME)
-    return false;
 
   if (!gimple_assign_copy_p (stmt))
     return false;
+  if (TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME)
+    return false;
   operand = gimple_assign_rhs1 (stmt);
-
   if (TREE_CODE (operand) != SSA_NAME)
     return false;
 
@@ -1381,6 +1382,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
          gimple_call_set_lhs (new_stmt, new_temp);
 
          vect_finish_stmt_generation (stmt, new_stmt, gsi);
+         mark_symbols_for_renaming (new_stmt);
 
          if (j == 0)
            STMT_VINFO_VEC_STMT (stmt_info) = *vec_stmt = new_stmt;
@@ -1429,6 +1431,7 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
          gimple_call_set_lhs (new_stmt, new_temp);
 
          vect_finish_stmt_generation (stmt, new_stmt, gsi);
+         mark_symbols_for_renaming (new_stmt);
 
          if (j == 0)
            STMT_VINFO_VEC_STMT (stmt_info) = new_stmt;