[Bug middle-end/46142] [4.6 Regression] FMA test failures

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Oct 31 07:02:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46142

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.10.31 06:55:48
   Target Milestone|---                         |4.6.0
     Ever Confirmed|0                           |1

--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2010-10-31 06:55:48 UTC ---
Well, well.

static bool
vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
{
  ...
  enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
  ...

  /* Bail out if the function has more than three arguments, we do not have
     interesting builtin functions to vectorize with more than two arguments
     except for fma.  No arguments is also not good.  */
  if (nargs == 0 || nargs > 3)
    return false;
  ...
}

For some reason, valgrind didn't cathc this problem. Anyway, the patch is
obvious:

Index: tree-vect-stmts.c
===================================================================
--- tree-vect-stmts.c    (revision 166104)
+++ tree-vect-stmts.c    (working copy)
@@ -1308,7 +1308,8 @@ vectorizable_call (gimple stmt, gimple_s
   loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
   tree fndecl, new_temp, def, rhs_type;
   gimple def_stmt;
-  enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
+  enum vect_def_type dt[3]
+    = {vect_unknown_def_type, vect_unknown_def_type, vect_unknown_def_type};
   gimple new_stmt = NULL;
   int ncopies, j;
   VEC(tree, heap) *vargs = NULL;



More information about the Gcc-bugs mailing list