This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[autovect] [patch] remove redundant check in (vect_is_simple_use)





Hi,

This patch removes redundant check, found by Daniel Berlin, for what it is
in EMPTY_STMT since it can never fail.

Bootstrapped/regtested successfully on ppc64-yellowdog-linux, on autovect
branch


2006-01-29  Victor Kaplansky <victork@il.ibm.com>

        * tree-vectorizer.c (vect_is_simple_use): removes redundant check
for
        what it is in EMPTY_STMT since it can never fail.

-- Victor

Index: gcc/tree-vectorizer.c
===================================================================
--- gcc/tree-vectorizer.c     (revision 110366)
+++ gcc/tree-vectorizer.c     (working copy)
@@ -1668,17 +1668,9 @@ vect_is_simple_use (tree operand, loop_v
      (Otherwise - we expect a phi_node or a modify_expr).  */
   if (IS_EMPTY_STMT (*def_stmt))
     {
-      tree arg = TREE_OPERAND (*def_stmt, 0);
-      if (TREE_CODE (arg) == INTEGER_CST || TREE_CODE (arg) == REAL_CST)
-        {
-          *def = operand;
-          *dt = vect_invariant_def;
-          return true;
-        }
-
-      if (vect_print_dump_info (REPORT_DETAILS))
-        fprintf (vect_dump, "Unexpected empty stmt.");
-      return false;
+      *def = operand;
+      *dt = vect_invariant_def;
+      return true;
     }

   bb = bb_for_stmt (*def_stmt);
Index: gcc/ChangeLog.autovect
===================================================================
--- gcc/ChangeLog.autovect    (revision 110366)
+++ gcc/ChangeLog.autovect    (working copy)
@@ -1,3 +1,8 @@
+2006-01-29  Victor Kaplansky <victork@il.ibm.com>
+
+     * tree-vectorizer.c (vect_is_simple_use): removes redundant check for
+     what it is in EMPTY_STMT since it can never fail.
+
 2006-01-26  Ira Rosen  <irar@il.ibm.com>

      * tree-vect-transform.c (vect_create_data_ref_ptr): Don't handle


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]