This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/49749] Reassociation rank algorithm does not include all non-NULL operands


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

--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-21 12:04:01 UTC ---
+      tree arg = gimple_phi_arg (stmt, i)->def;
+      if (TREE_CODE (arg) == SSA_NAME)
+    {
+      gimple def_stmt = SSA_NAME_DEF_STMT (arg);
+      if (def_stmt
+          && gimple_bb (def_stmt)

arg = gimple_phi_arg_def (stmt, i);
if (TREE_CODE (arg) == SSA_NAME
    && !SSA_NAME_IS_DEFAULT_DEF (arg))
  {
    gimple def_stmt = SSA_NAME_DEF_STMT (arg);
...

without the def_stmt != NULL and gimple_bb != NULL check.


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